Program to find area and circumference of circle using radius
- Circumference of circle = 2Ï€r
- Area of circle = πr^2
Program to find area and circumference of circle using radius
radius = float(input("enter radius "))
pi = 3.1423
#circumference of circle
circum = 2*pi*radius
print("circumference of circle ",circum)
#area of circle
area = pi*radius*radius
print("area of circle ",area)
#USING INBUILT FUNCTIONS
from math import pi
area1 = pi*radius*radius
circum1 = 2*pi*radius
print("area is ",area1)
print("circumference ",circum1)
Output
enter radius 4
circumference of circle 25.1384
area of circle 50.2768
50.26548245743669
25.132741228718345
Comments
Post a Comment
Type Your Comments !
Please do not enter any spam link in the comment box.