Python program to calculate the area and circumference of the circle.

Here is a python program to find the area of the circle and circumference of the circle.

Contents

Area of circle


#Python program to calculate the area and circumference of the circle.

pi = 3.14
radius = 4

#Area of the circle

print('\n\nCalculate the area of the cirlcle with 4 radius')
print('π = 3.14')
print('r = 4')
area = pi * radius * radius
print('Radius of circle = πr2 = ',area)

# This code is contributed by Ahmad Shafiq

Circumference of circle


#Python program to calculate the area and circumference of the circle.

pi = 3.14
radius = 4

#Circumference of the circle

print('\n\nCalculate the circumference of the cirlcle with 4 radius')
print('π = 3.14')
print('r = 4')
circumference = 2 * pi * radius
print('Circumference of circle = 2πr = ', circumference)

# This code is contributed by Ahmad Shafiq

callout-flag

Love this read? Subscribe to Modernage!

Do you have any queries? You can ask in the comments. We, at Modernage answer each and every question, asked in the comments, so If you have any queries, or you want to know about any specific platform you can ask in the comments below

Author

Leave a Reply

girl-carrying-document

More Articles.

SUBSCRIBE TO MODERNAGE

Top Posts

Author

SUBSCRIBE TO MODERNAGE

Technology

SUBSCRIBE TO MODERNAGE

Python

girl-carrying-document

More Articles.