Answer to Question #249249 in Python for Aein

Question #249249

In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. Write a program that prompts the user to enter the length of the three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle. Use functional programming paradigm on this problem.  


1
Expert's answer
2021-10-10T10:33:27-0400
def is_right(opp, adj, hyp):
   opp = int(input(''))
   adj = int(input('')) 
   hyp = int(input(''))
   if hyp**2 == opp ** 2 + adj ** 2:
      return 'This is a right angle triangle'
   else:
      return 'This is not a right angle triangle'

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