WRITE A PROGRAM TO CALCULATE THE AREA OF THE TRAPEZOID?
hint;- need height,base1,base2 and FORMULA OF AREA is (height*(base1+base2))/2
PYTHON PROGRAM...
Share
WRITE A PROGRAM TO CALCULATE THE AREA OF THE TRAPEZOID?
hint;- need height,base1,base2 and FORMULA OF AREA is (height*(base1+base2))/2
PYTHON PROGRAM...
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Program:
# Python program to print the area of a trapezoid
h = float(input("Enter the height: "))
b1 = float(input("Enter the base ( 1 ): "))
b2 = float(input("Enter the base ( 2 ): "))
A = (h*(b1+b2))/2
print("Area of trapezoid:", A)
Output is provided in the attachments..