Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Calculating area of triangle giving base and height
- def triangle_area(base, height):
- area = (float(base) * float(height))/2
- return area
- base = input("Type the base > ")
- height = input("Type the height > ")
- my_area = triangle_area(base,height)
- print("Area of Triangle = " + str(my_area))
Advertisement
Add Comment
Please, Sign In to add comment