Dark Mode On/Off

# Python Program to Find Area of a Circle

In this tutorial, we will learn how to find the area of a circle using the Python programing language. Previously, we saw how to find the area of a square, we will follow a similar approach and use the formula for calculating the area of a circle.

## Formula: Our program should take input as follows and display area as output.

For a circle with a radius of 7 cm, the area of a circle is 154cm

Output- Area: 154

Look at the algorithm below to understand the working.

## Algorithm

Step 1- Define a function area_of_circle()

Step 2- Set pi as constant and initialize to 3.147

Step 3- Declare variable area to calculate and store area

Step 4- Return area

Step 5- Take input of radius from the user

Step 6- Pass radius in the function

Step 7- Print the result

## Python Program

Look at the program to understand the implementation of the above-mentioned approach.

``````def area_of_circle(r):
pi=3.147
area= pi*r*r
return area

``````