# Question - Take diameter as input and calculate the area of a circle.
diameter = int(input("Inter the value of diameter: "))
radius = diameter/2
area = 3.14 * (radius ** 2)
print("Radius of the circle is", radius)
print("Area of circle is", area)
OUTPUT :
Inter the value of diameter: 50
Radius of the circle is 25.0
Area of circle is 1962.5
2. #Data Types program
food= "Samosa"
age= 25
area= 670.98
name= "Khushi"
print("Data type of variable name is", type(name))
print(type(area))
OUTPUT :
Data type of variable name is <class 'str'>
<class 'float'>
3. # program to take age as input and print value entered and its data
type age = input("Enter your age : ")
print("Value entered is :", age)
print("Data type is : ", type(age))
OUTPUT :Enter your age : 25
Value entered is : 25
Data type is : <class 'str'>
#Modify this program to find the average of two numbers instead of the
sum
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
average = (a + b) / 2
print("The average is:", average)
OUTPUT : Enter first number: 10
Enter second number: 20
The average is: 15.0