What am I missing?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What am I missing??

My code is to figure out whether a triangle is right-angled or not, and It looks correct to me, yet solo says all but one test case works. Apparently I'm missing something. https://code.sololearn.com/c2mHIrsU03Ek/?ref=app

21st Oct 2020, 3:30 PM
Mike Yeager
Mike Yeager - avatar
2 Answers
+ 6
if side3**2 == side1**2 + side2**2: side3^2 is binary or exclusive operator not power
21st Oct 2020, 3:45 PM
Abhay - avatar
+ 3
As Abhay said, in python "**" is power not "^"
21st Oct 2020, 4:45 PM
Sousou - avatar