Python Program To Find Area Of A Circle

In this article, you will learn to find the area of a circle using the python program.

The formula for the area of a circle

Area = πr2


r is the radius of the circle that is taken by the user


Program


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# area of circle in python
# take input of radius by the user 
r = float(input("Enter the radius of circle: "))

# value of pi is 3.142
pi = 3.142

# area of circle is pi x r x r
area = pi * r * r

# prin the area of circle of a given radius
print("Area of the circle is: ",area)

#area of circle in python - docodehere.com

Output


Enter the radius of circle: 12.2 Area of the circle is: 467.65527999999995

Next Post Previous Post
No Comment
Add Comment
comment url