Write a Python program to calculate the area of a trapezoid.
Note: A trapezoid is a quadrilateral with two sides parallel. The trapezoid is equivalent to the British definition of the trapezium. An isosceles trapezoid is a trapezoid in which the base angles are equal so.
base_1 = 5 base_2 = 6 height = float(input("Height of trapezoid: ")) base_1 = float(input('Base one value: ')) base_2 = float(input('Base two value: ')) area = ((base_1 + base_2) / 2) * height print("Area is:", area)
Height of trapezoid: 6 Base one value: 10 Base two value: 5 Area is: 45.0
Write a Python program to calculate the area of a trapezoid
Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.