Write a program to enter radius of circle and calculate area and circumference in python
Answers
Answered by
58
The following codes must be typed in script mode, saved and them executed.
CODE 1:
r = float(input("Enter the radius of the circle:"))
area = 3.14*r**2
circ = 2*3.14*r
print("The area of the circle is", area)
print("The circumference of the circle is:", circ)
OUTPUT:
5
CODE 2:
r = float(input("Enter the radius of the circle:"))
print("The area of the circle is", 3.14*r**2)
print("The circumference of the circle is:", 2*3.14*r)
OUTPUT:
5
Answered by
0
Answer:
r = float(input("Enter the radius of the circle:"))
area = 3.14*r**2
circ = 2*3.14*r
print("The area of the circle is", area)
print("The circumference of the circle is:", circ)
Similar questions