- 4

Will this actually skip 3?

8th Jun 2021, 9:48 PM
Fady Takla
Fady Takla - avatar
8 Respuestas
+ 6
What is "this"? 🤔
9th Jun 2021, 12:35 AM
David Ashton
David Ashton - avatar
+ 6
It will skip 3 if print(i) and i += 1 come AFTER the if i == 3 part
9th Jun 2021, 4:07 AM
David Ashton
David Ashton - avatar
+ 3
Simba are you joking? Or do you actually know what Fady is talking about?
9th Jun 2021, 1:53 AM
David Ashton
David Ashton - avatar
+ 2
Hi! Yes, will be.
8th Jun 2021, 9:57 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 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. 😅
9th Jun 2021, 1:51 AM
David Ashton
David Ashton - avatar
+ 1
Correct. But this is how its written in the app example. Oh well. Thanks for your help guys. And I'll remember 42!
9th Jun 2021, 4:12 AM
Fady Takla
Fady Takla - avatar
0
Im not so sure. I think it will print skipping 3 then print 3
9th Jun 2021, 12:51 AM
Fady Takla
Fady Takla - avatar
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
9th Jun 2021, 4:02 AM
Fady Takla
Fady Takla - avatar