Python Program to Calculate Area of an Ellipse

This Python program calculates are of an ellipse given length of major axis and minor axis.

In mathematics, ellipse is a regular oval shape which is traced by a point moving in a plane such that the sum of its distances from two other points known as foci is constant.

Given length of major axis and minor axis, area of an ellipse is calculated using following formula:

Area of an ellipse = π * major axis length * minor axis length

Python Source Code: Ellipse Area

# Reading length of major axis
major = float(input("Enter length of major axis: "))

# Reading length of minor axis
minor = float(input("Enter length of minor axis: "))

# Calculating area of an ellipse
area = 3.141592 * major * minor

# Displaying result
print("Area of an ellipse = ", area)


Enter length of major axis: 8
Enter length of minor axis: 4
Area of an ellipse =  100.530944