Answer to Question #223566 in Python for Remo

Question #223566

In the given example, the first side

A = 3, and the second side B = 4. To calculate the hypotenuse we use Pythagoras theorem. According to Pythagoras theorem, hypotenuse2 = 32 + 42

Therefore, the hypotenuse value is

5. So, the output should be 5.


1
Expert's answer
2021-08-05T03:02:18-0400
A = int(input('Enter length of first side here: '))
B = int(input('Enter length of second side here: '))
print((A**2+B**2)**(1/2))

Enter length of first side here: 3
Enter length of second side here: 4
5.0

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS