June 2017
Beginner
320 pages
7h 37m
English
Now to totally blow your mind with a new loop, the while-loop. A while-loop will keep executing the code block under it as long as a Boolean expression is True.
Wait, you have been keeping up with the terminology, right? That if we write a line and end it with a : (colon) then that tells Python to start a new block of code? Then we indent and that’s the new code. This is all about structuring your programs so that Python knows what you mean. If you do not get that idea then go back and do some more work with if-statements, functions, and the for-loop until you get it.
Later on we’ll have some exercises that will train your brain to read these structures, similar to how we burned Boolean expressions into your brain.
Read now
Unlock full access