Advertisement
Abiala

assignment3

Mar 28th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #To calculate the value of the hypotenuse of a right angled triangle
  2. import math
  3. a = int(input('The value of the opposite side: '))         #Opposite side
  4. b = int(input('The value of the adjacent side: '))         #Adjacent side
  5. c = math.sqrt(a**2 + b**2)                                        #Hypotenuse
  6. print('The value of the hypotenuse is: ' + str(c))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement