Calculating the area of a circle is a common geometry problem that can be solved in many programming languages, including Python. In this tutorial, we will learn how to write a program that calculates the area of a circle in Python.

To start, we need to understand the formula for calculating the area of a circle.

## Formula for Area of Circle

The formula is: Area = π * r^2

• where “Area” is the area of the circle.
• π” (pi) is a mathematical constant approximately equal to 3.14, and
• r” is the radius of the circle

## Algorithm for Area of Circle

Here is a simple algorithm for calculating the area of a circle in Python:

2. Calculate the area of the circle using the formula:
`area = pi * radius * radius`.
3. Print the area of the circle.

From the above algorithm, we understood how to implement a python program to calculate the area of the circle. Now it is time to perform it practically.

But before writing this program you have to know about:

1. math module (Optional)
2. how to take user input in python
3. Python operators

### Source Code

``````import math

print(f"Area of Circle is {area}")``````

### Output

Instead of writing `math.pi` you can directly write the value of pi that is 3.14

Now let’s write the same program by using function.

## Calculate Area of Circle Using Function

But before writing this program few programming concepts you have to know:

1. math module (Optional)
2. how to take user input in python
3. Python operators
4. Python Functions

### Source Code

``````def circle_area(radius): 