+ 3
что-то пошло не так? something went wrong?
i=2 while i<=2: print(i) i-=1
1 Resposta
+ 7
What were you expecting? You've set i to 2. Then you're running a while loop till i is smaller than or equal to 2, and subtracting 1 from `i` each time. So the value of `i` will keep decreasing and will always be <= 2. So it is an infinite loop that prints infinitey from 2 subtracting 1 each time