Computer Science, asked by sumbulzaidi, 3 months ago

WRITE A PROGRAM TO PRINT AREA OF CIRCLE?(in python)​

Answers

Answered by anindyaadhikari13
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:
Similar questions