+ 2
Why do I get an infinite loop
i = 1 while i <=5 print(i) i = i + 1
3 Answers
+ 2
The code won't run because of improper indentation ,not sure how you get infinite loop
i = 1
while i <=5:
print(i)
i = i + 1
+ 1
Thanks so much guys
+ 1
Indentation error will occur due to not following spaces as per syntax but your code seems to be correct.