Computer Science, asked by Mimix123, 8 hours ago

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...

Answers

Answered by MichMich0945
1

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..

Attachments:
Similar questions