+ 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"?
4 Respuestas
+ 2
You have actually done a logical error.
Check and compare
https://code.sololearn.com/cRlVJ6OwUikB/?ref=app
+ 1
Side3**2 must be there as a^2+b^2=c^2
+ 1
you can use 3 , 4 , 5 ; where 5 is hypotenuse and 3 and 4 can be either base /perpendicular .
0
Following input:
1 [ENTER]
1 [ENTER]
2 [SUBMIT]
will print "Right-angled"