Answer:
Write a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is a right triangle.
x = int(input("Enter the first side: "))
y = int(input("Enter the second side: "))
z = int(input("Enter the third side: "))
if (x**2)==(y**2)+(z**2) or (y**2)==(x**2)+(z**2) or (z**2)==(x**2)+(y**2):
print("The triangle is a right triangle.")
else:
print("The triangle is not a right triangle.")
Step-by-step explanation:
Need to use the or statement to try the different combinations since the base and sides are not predetermined.