Python Example Program to Find the Area of a Circle using Radius

Learn to write a Simple Python Program to find the Area of a Circle using radius value.

In this program we ask the user to enter the radius value and then we calculate the circle area and then we display it.

Source Code for area of a circle.py

 1 #www.ExampleProgram.com
 2 
 3 #import the math module to get pi value
 4 import math
 5 
 6 #read radius of the circle from user
 7 radius = float(input("Enter the radius of the circle : "))
 8 
 9 #calculate area
10 area = math.pi * radius * radius
11 
12 #display result
13 print("Area of the Circle is : {0}".format(area))

Watch this video to learn how this works