Advertisement
Guest User

Triangle function

a guest
Apr 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def triangle():
  2.     print("Can you give me the dimensions of a triangle")
  3.     num1 = float(input("Height > "))
  4.     num2 = float(input("Base > "))
  5.     result = float(num1 * num2)/2
  6.     Area = str(result)
  7.     print("Area of the Triangle is " + Area)
  8. triangle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement