Python program to calculate parallelogram circumference

Views: 140   

Following program shows you how to calculate parallelogram circumference.
This program gets parallelogram base and side from user and calculates circumference and prints it using following formula
Circumference = 2 X base X side

parallelogramBase = float(input("Please enter base of parallelogram:"))
parallelogramSide = float(input("Please enter side of parallelogram:"))
circumferenceOfParallelogram = 2 * (parallelogramBase + parallelogramSide)
print("Circumference of parallelogram is: ", circumferenceOfParallelogram)


Please enter base of parallelogram: 12
Please enter side of parallelogram: 17
Circumference of parallelogram is:  58.0
On By