Python Program to Find Area and Circumference of Circle

This python program calculates area and circumference of circle whose radius is given by user.

Following formula are used in this program to calculate area and circumference of circle:

Area = πr2

Circumference =2πr

Python Source Code: Circle Area & Circumference Calculator


# Finding area and circumference

# importing math module for PI
import math

# Reading temperature in Celsius
radius = float(input('Enter radius of circle: '))

# Calculating area and circumference
area = math.pi * radius ** 2
circumference = 2 * math.pi * radius

# Displaying output
print('Area = %0.4f.' % (area))
print('Circumference = %0.4f.' % (circumference))

Python Area & Circumference of Circle Output

Enter radius of circle: 5
Area = 78.5398.
Circumference = 31.4159.