WRITE A PROGRAM TO PRINT AREA OF CIRCLE?(in python)
Answers
Answered by
3
Solution:
Using Python,
from math import pi
r=float(input("Enter radius: "))
a=pi*r*r
print("Area of the circle is:",round(a,2),"sq units.")
Explanation:
- Math module contains value of pi. From here, we have accessed the value of pi.
- Then using formula, area is calculated and displayed on the screen.
See attachment for output.
Attachments:
![](https://hi-static.z-dn.net/files/dbd/a45b013230701dffddc7ce39c1148470.jpg)
Similar questions