Write a Python Program to find the Parallelogram Area. This example allows entering parallelogram base and height and finding the area by multiplying both.
parallelBase = float(input("Enter Parallelogram Base : "))
ParallelHeight = float(input("Enter Parallelogram Height : "))
parallelArea = parallelBase * ParallelHeight
print("The Area of a Parallelogram = %.3f" %parallelArea)
Enter Parallelogram Base : 20
Enter Parallelogram Height : 32
The Area of a Parallelogram = 640.000
Python Program to find Parallelogram Area
In this Program, we catered a calParallelogramArea function to find the Area of the Parallelogram.
def calParallelogramArea(a, b):
return a * b;
parallelBase = float(input("Enter Parallelogram Base : "))
ParallelHeight = float(input("Enter Parallelogram Height : "))
parallelArea = calParallelogramArea(parallelBase, ParallelHeight)
print("The Area of a Parallelogram = %.3f" %parallelArea)
