Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Function that accepts the dimensions of a triangle and returns its area.
- print("Let's do triangle's area:")
- def area():
- input1 = input("Side 'a' of triangle > ")
- input2 = input("Side 'b' of triangle > ")
- input3 = input("Side 'c' of triangle > ")
- number1 = float(input1)
- number2 = float(input2)
- number3 = float(input3)
- result = (number1 + number2 + number3)/2
- output = str(result)
- return output
- output = area()
- print ("The result of the triangle's area has been: " + output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement