Advertisement
richbpark

Area of a Triangle - 1

Jan 21st, 2019
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # Area of a Triangle - 1 Rich Park January 20, 1019
  2. # Formula - Area = (Base * Height)
  3.  
  4. def TriArea1 (): #Code
  5. base = float(input("Enter the value for the Base -> "))
  6. height = float(input("Enter the value for the Height -> "))
  7. area = (base * height)/2
  8. print ('Triangle area is: ', area)
  9.  
  10. TriArea1() #Function call
  11.  
  12. ########### OUTPUT ####################
  13. # Enter the value for the Base -> 18 #
  14. # Enter the value for the Height -> 6 #
  15. # Triangle area is: 54.0 #
  16. #######################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement