Use comments to answer the investigate questions on the example code.
Help! My code doesn’t work
Make sure that you check for the following things:
- Iteration begins with
while
.
- The
while
line has a condition.
- The
while
line has a colon at the end.
-
All the code you want to repeat is indented after the
while
.
- Any code that should run once the loop has finished is not indented