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

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz