Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions area.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#program to find area of circle using functions
import math

#Function that calculates area of circle
def area_of_circle(r):
a = r**2 * math.pi
return a

r = float(input("Enter the radius of the circle: "))
print("%.2f" %area_of_circle(r))