Files
notes/CS1032/practical-2023-10-18/fn1.py
bluepython508 688d1ec426 Initial work
2023-11-01 08:55:40 +00:00

8 lines
229 B
Python

def trapezium_area(w1, w2, h):
return h * (w1 + w2) / 2
w1 = int(input("Width of the top: "))
w2 = int(input("Width of the bottom: "))
h = int(input("Height: "))
print(f"Area is {trapezium_area(w1, w2, h)}")