Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This program will ask the base and height of a triangle to find the area
- def area_triangle(): #defines the function
- base = input("what is the base of the triangle")
- height = input( "what is the height of the triangle")
- area = .5 * ( int(base) * int(height)) # equation for area inside a triangle
- print(area)
- area_triangle() #actually runs the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement