+ 1
Why the result is showing 1,2,3,4,5,6?where did the 6 come from?
i = 1 while i <=5: print(i) i = i + 1 print(i)
5 ответов
+ 4
1. Loop
Print 1
i=2
2.Loop
Print 2
I=3
....
5.Loop
Print 5
i=6
Loop stops
Print 6
+ 3
In last loop i =5
5 is printed and after incremented to 6
The print behind the loop prints the 6
+ 2
Learn about loops. So that you can understand how they works and what are they
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2435/?ref=app
https://www.sololearn.com/learn/Python/2281/?ref=app
0
Oma Falk bro..i'm still not clear
0
Oh...thnx bro😄