Python Program to Calculate Area of Circle

Area of a circle is defined as region occupied by it, mathematically it can be calculated using radius of circle using formula = πr2 quite simple just need to program multiplication of pie, square of radius that’s Area of Circle.
Let’s see Python Code for Calculating area of a circle.

# Finding area of circle using Python

# Import Python's Math Module
import math

# Accessing value of Pie from Math Module
π = math.tau

# Ask user for radius of circle
radius = float(input("Enter radius of circle => "))

area_of_circle = π * (radius**2)

print("Area of circle is =>", area_of_circle)

Output of Above Code

Enter radius of circle => 5
Area of circle is => 157.07963267948966

Gagan

Hi, there I'm founder of ComputerScienceHub(Started this to bring useful Computer Science information just at one place). Personally I've been doing JavaScript, Python development since 2015(Been long) - Worked upon couple of Web Development Projects, Did some Data Science stuff using Python. Nowadays primarily I work as Freelance JavaScript Developer(Web Developer) and on side-by-side managing team of Computer Science specialists at ComputerScienceHub.io

Leave a Reply

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

Recent Posts