Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #To calculate the value of the hypotenuse of a right angled triangle
- import math
- a = int(input('The value of the opposite side: ')) #Opposite side
- b = int(input('The value of the adjacent side: ')) #Adjacent side
- c = math.sqrt(a**2 + b**2) #Hypotenuse
- print('The value of the hypotenuse is: ' + str(c))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement