Get area of circle using Python

 # Get the area of a circle using Python


circleDiameter = 8 #in centimeter

#we know the formula for area of circle is 2 x pi x radius
#pi formula is not a builtin function for python
# I need to use the math library

from math import pi

circleArea = pi * ((circleDiameter/2)**2)

print(circleArea)

Comments

Popular posts from this blog

Husband's Affair with Step Daughter Ends in Grisly Murder (True Crime Documentary)