Write a Python program to calculate the area of a circle. The user needs to input the value of the radius of the circle.
area = 3.14 x radius x radius
You should use a function named circlearea to perform the calculation
3.
Write a Python program to calculate the area of a square. The user needs to input the value of the length of the square.
area = len*len
You should use a function named squarearea to perform the calculation
java please
def circlearea(radius):
return 3.14*radius*radius
radius=float(input('Enter the radius: '))
area=circlearea(radius)
print('Area=',area)
def squarearea(length):
return length*length
length=float(input('Enter the length of square: '))
area=squarearea(length)
print('Area=',area)
Get Answers For Free
Most questions answered within 1 hours.