Computer Science, asked by mmorris3805, 10 months ago

Write a program to enter radius of circle and calculate area and circumference in python

Answers

Answered by Equestriadash
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:

\tt Enter\ the\ radius\ of\ the\ circle: 5

\tt The\ area\ of\ the\ circle\ is\ 78.5\\The\ circumference\ of\ the\ circle\ is\ 31.4

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:

\tt Enter\ the\ radius\ of\ the\ circle: 5

\tt The\ area\ of\ the\ circle\ is\ 78.5\\The\ circumference\ of\ the\ circle\ is\ 31.4

Answered by akpandey5232
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