Advertisement
banjothorn

Untitled

Oct 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. print("Calculate the area of a triangle")
  2. input1 = input("What is the length of the base of the Triangle? ")
  3. base=int(input1)
  4. input2 = input("What is the height of the Triangle? ")
  5. height=int(input2)
  6. half_base=(base/2)
  7. units=input("What units of measurement are you using? ")
  8. area = (half_base * height)
  9. result=str(area)
  10. print (" ")
  11. print ("The area of the triangle is " + result + " Square " + units)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement