please answer this question of computer working should be in IDLE answer all of them python please answer fast
Attachments:
Answers
Answered by
1
Answer:
Here is the code:
FOR QUESTION NUMBER 1:
def circle_calculation(radius):
circumference = 2*3.14*radius
area = 3.14*radius*radius
return circumference, area
radius = input("Enter radius of a circle: ")
circumference, area = circle_calculation(int(radius))
print("Circumference of the circle is ", circumference, " and area of the circle is ", area)
FOR QUESTION NUMBER 2:
def rect_calculation(length, breadth):
area = length*breadth
return area
length = input("Enter length of rectangle: ")
breadth = input("Enter breadth of rectangle: ")
area = rect_calculation(int(length), int(breadth))
print("Area of the rectangle is ", area)
Similar questions