- 4
Will this actually skip 3?
8 ответов
+ 6
What is "this"? 🤔
+ 6
It will skip 3 if print(i) and i += 1 come AFTER the if i == 3 part
+ 3
Simba are you joking? Or do you actually know what Fady is talking about?
+ 2
Hi! Yes, will be.
+ 2
Fady Takla Your question is like me asking you, "should I use the red one or the green one?" You would have no idea what I'm talking about. Well I have no idea what you're talking about. Please explain. 😅
+ 1
Correct. But this is how its written in the app example. Oh well. Thanks for your help guys. And I'll remember 42!
0
Im not so sure.
I think it will print skipping 3 then print 3
0
Sorry guys. I thought when i posted a comment about a course/lesson, that the code would be there for everyone to reference. I found the course in question. The course is a WHILE example for python and suggests that this code will skip the number 3 but I did'nt think it would and i didnt have pro and today is only my second day. so i figured I'd ask. anyways, I was right. it doesn't actually skip 3..LOL.
i = 1
while i<=5:
print(i)
i+=1
if i==3:
print("Skipping 3")
continue