Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Futurelearn RPi course: Python 102 - Week 1 Function
- def area_of_triangle(base, height):
- area = 0.5 * base * height
- return area
- base = float(input("Enter the triangle base length: "))
- height = float(input("Enter the triangle height: "))
- area = area_of_triangle( base, height )
- print ("The area of the triangle is " + str(area))
Advertisement
Add Comment
Please, Sign In to add comment