+ 1

Else statement V (need explaination/hint instead of solution)

side1 = int(input()) side2 = int(input()) side3 = int(input()) #your code goes here if(side1 and side2 and side3)>0: if (side1 ==(side2+side3) or side2==(side1+side3) or side3==(side1+side2)): print("Not right-angled ") else: print("Right-angled ")

29th Oct 2020, 10:47 AM
AliHsnRaza Khan
AliHsnRaza Khan - avatar
2 Respostas
+ 8
side1 = int(input()) side2 = int(input()) side3 = int(input()) if side3**2 == side1**2 + side2**2: print("Right-angled") else: print("Not right-angled") Pythagorean theorem: the square of the hypotenuse is equal to the sum of the squared legs
29th Oct 2020, 10:57 AM
Yurii Ostapenko
Yurii Ostapenko - avatar
0
Yurii Ostapenko thanks mate
29th Oct 2020, 11:06 AM
AliHsnRaza Khan
AliHsnRaza Khan - avatar