Pythagorean's challenge


whats wrong in this code

hey @naazsayma123 ,
The problem it is getting stucked in infinite loop is that,
for example take 25.
So a=0,b=5 ,
First condition checked and printed , but not updated , hence the values remains the same.
So just add a+=1 in the first if condition and it will work.

I hope this helped.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.