Write Python Program to Find the area of a circle

Here we have explained the Python program to find the area of ​​a circle. Before writing a Python program, we will learn about how to find the area of ​​a circle.

As
The formula for the area of ​​the circle is A = πr2

Program to find the area of ​​a circle in Python

Using math module

import math

r= int(input("Enter radius of the circle = "))
 

area= math.pi*r*r  #Formula to find area of a circle 

print("Area of a circle is = ", area)

Another method to find area of a circle


pi = 3.14 

r= int(input("Enter radius of the circle = "))
 

area= pi *r*r  #Formula to find area of a circle 

print("Area of a circle is = ", area)

Explanation

We can find the area of ​​a circle using the Math model in Python, for this we have written “Import Math” in the first line.

If we do not do this, then we have to write the value of pi, which is written in the second method.

Other Python programs

Write a Python Program to Add Two Numbers

Write a python program to print Fibonacci series

Write a Python program to find the area and perimeter of a rectangle

Share:

Write A Comment

Your email address will not be published. Required fields are marked *

  • Recent Posts