Q:

Write a Python program which accepts the radius of a circle from the user and compute the area

0

Write a Python program which accepts the radius of a circle from the user and compute the area.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

I have used python 3.7 compiler for debugging purpose.

from math import pi
radius = float(input ("Input the radius of the circle : "))
print ("The area of the circle with radius " + str(radius) + " is: " + str(pi * radius**2))

Result:

Input the radius of the circle : 5

The area of the circle with radius 5.0 is : 78.53981633974483

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now