A Program to Find the Area of a Parallelogram

In this example, we are giving a program to find the area of a parallelogram. The rule of finding the area of a parallelogram is: A = base * vertical_height.


Program to find the area of a parallelogram:

  1. b = float(input("Enter the value of base: "))
  2. h = float(input("Enter the value of height: "))
  3. area = b * h;
  4. print("Area of parallelogram: %.2f"%area)

Output:

Enter the value of base: 3
Enter the value of height: 4
Area of parallelogram: 12.00