Write a Python program to calculate the area of a parallelogram


This program calculates the area of a rectangle given the length of its base and its height. It first prompts the user to enter the length of the base and the measurement of the height of the rectangle. Then it calculates the area by multiplying the length of the base by the height using the formula for the area of a rectangle, which is "Area = base x height". Finally, it prints the result using the print() function.

Source Code

base = float(input("Enter The Length of Base : "))
height = float(input("Enter Measurement of height : "))
area = base * height
print("Area : ", area)

Output

Enter The Length of Base : 5
Enter Measurement of height : 3.4
Area :  17.0

Example Programs