Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #This program will ask the base and height of a triangle to find the area
  2. def area_triangle(): #defines the function
  3. base = input("what is the base of the triangle")
  4. height = input( "what is the height of the triangle")
  5. area = .5 * ( int(base) * int(height)) # equation for area inside a triangle
  6. print(area)
  7.  
  8. area_triangle() #actually runs the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement