Views: 122
Following program shows you how to calculate trapezoid circumference.
This program gets trapezoid bases and sides from user and calculates circumference and prints it using following formulaCircumference = base1 + base2 + side1 +side2
trapezoidBase1 = float(input("Please enter base1 of trapezoid:"))
trapezoidBase2 = float(input("Please enter base2 of trapezoid:"))
trapezoidSide1 = float(input("Please enter side1 of trapezoid:"))
trapezoidSide2 = float(input("Please enter side2 of trapezoid:"))
circumferenceOfTrapezoid = trapezoidBase1 + trapezoidBase2 + trapezoidSide1 + trapezoidSide2
print("Circumference of trapezoid is: " , circumferenceOfTrapezoid)
Output:
Please enter base1 of trapezoid: 22
Please enter base2 of trapezoid: 14
Please enter side1 of trapezoid: 18
Please enter side2 of trapezoid: 24
Circumference of trapezoid is: 78.0
On By
Navya
Top Tutorials
492.5K
31.9K
21.7K
18.7K
18.6K
6.7K
6.6K
4.9K
3.3K
3.1K
Top Questions
18.6K
14.5K
8.3K
6.5K
6.1K
5.7K
4.8K
4.8K
4.3K
3.9K
Top Articles
1.9K
1.6K
944
Top Blogs
792
778
52
Top News
748
683
669
397
381
377