Python Program to find Rhombus Area

Write a Python Program to Find the Area of a Rhombus with an example. This Python example allows Rhombus first and second diagonal and calculates Rhombus area.

# Python Program to find Rhombus Area

rhombusD1 = float(input("Enter Rhombus First Diagonal  = "))

rhombusD2 = float(input("Enter Rhombus Second Diagonal = "))

rhombusArea = (rhombusD1 * rhombusD2)/2

print("The Area of a Rhombus = %.3f" %rhombusArea) 

Python Rhombus area output

Enter Rhombus First Diagonal  = 25
Enter Rhombus Second Diagonal = 28
The Area of a Rhombus = 350.000

In this Python Program, we created a calRhombusArea function to find the Rhombus Area.

# Python Program to find Rhombus Area

def calRhombusArea(d1, d2):
    return (d1 * d2)/2

rhombusD1 = float(input("Enter Rhombus First Diagonal  = "))

rhombusD2 = float(input("Enter Rhombus Second Diagonal = "))

rhombusArea = calRhombusArea(rhombusD1, rhombusD2)

print("The Area of a Rhombus = %.3f" %rhombusArea) 
Python Program to find Rhombus Area 2