Page
Assignment 1.1 - Answer
Assignment 1.1 - Answer
# This is a program that calculates the area of a trapezoid
print ("Area of a trapezoid")
h = int(input("Enter the height of the trapezoid: "))
b1 = int(input("Enter the length of the bottom base: "))
b2 = int(input("Enter the length of the top base: "))
a = (b1 + b2)*h/2
print ("The area is: ", a)
input("Press enter to exit ;)")
Last modified: Friday, 12 May 2017, 12:01 AM