

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Loops
incomplete
2: Loops Practice
incomplete
3: Loops Practice
incomplete
4: Loop Review
incomplete
5: Loop Review
incomplete
6: Whitespace in Python
incomplete
7: Range Continued
incomplete
8: Sum Game
incomplete
9: Sum Game 2
incomplete
10: While
incomplete
11: Continue Statement
incomplete
12: Break Statement
incomplete
13: Match Countdown
incomplete
14: Experience Points
incomplete
15: Meditate
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
As a reminder, a "for loop" in Python is written like this:
for i in range(0, 10):
print(i)
In English, the code says:
i equals 0. (i in range(0))i is greater than or equal to 10 (range(0, 10)), exit the loop.i to the console. (print(i))1 to i. (range defaults to incrementing by 1)2The result is that the numbers 0-9 are logged to the console in order.
The body of a for-loop must be indented; otherwise, you'll get a syntax error.
In the print_numbers function, write a for-loop from scratch that logs the numbers 0-199 to the console.