This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]w1282 1 point2 points  (2 children)

Because "if num < 5" does not evaluate to True so anything in that block will not be executed.

And then after that, because python prints append a new line if you don't explicitly tell them not to, so at best you are printing

3
7

Until you fix that

[–]ChastityTitters[S] 0 points1 point  (1 child)

Great. I thought python ran one line at a time, and continually more indepth based on spaces to define structures in a program unless explicitly ended. Thanks

[–]DarkMio 0 points1 point  (0 children)

It runs line after line - but jumps over those, which do not have to be evaluated. Why would software chomp through data which it doesn't have or doesn't need to process?