diff --git a/area.py b/area.py new file mode 100644 index 0000000..17b6b8e --- /dev/null +++ b/area.py @@ -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)) \ No newline at end of file