+ 2

PYthagoras Theoreme

side1 = int(input()) side2 = int(input()) side3 = int(input()) if side3 == side1**2 + side2**2: print("Right-angled") else: if side3 != side1**2 + side2**2: print("Not right-angled") What can I do to output "Right-angled"?

15th Dec 2021, 10:30 AM
josé manuel
josé manuel - avatar
4 Respuestas
+ 2
You have actually done a logical error. Check and compare https://code.sololearn.com/cRlVJ6OwUikB/?ref=app
15th Dec 2021, 10:43 AM
Ananya | Inactive |
Ananya | Inactive | - avatar
+ 1
Side3**2 must be there as a^2+b^2=c^2
15th Dec 2021, 10:44 AM
YUGRAJ
+ 1
you can use 3 , 4 , 5 ; where 5 is hypotenuse and 3 and 4 can be either base /perpendicular .
16th Dec 2021, 4:05 AM
Kunj Mandaviya
Kunj Mandaviya - avatar
0
Following input: 1 [ENTER] 1 [ENTER] 2 [SUBMIT] will print "Right-angled"
15th Dec 2021, 12:27 PM
Coding Cat
Coding Cat - avatar