Programming Examples

Python program to calculate area and perimeter of a parallelogram


Program to calculate area and perimeter of a parallelogram

Solution

l=float(input("Enter length"))
w=float(input("Enter width"))
h=float(input("Enter height:"))
area_parallelogram=l*h
peri_parallalogram=2*l+2*w
print ("The area of the parallelogram is", area_parallelogram)
print(" The perimeter of the parallelogram is", peri_parallalogram)
Output

Enter length5.2

Enter width2.0

Enter height:1.5

The area of the parallelogram is 7.800000000000001

 The perimeter of the parallelogram is 14.4

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad