๐Ÿ PyQuest๐Ÿ” Loops Loops Loops ยท ๐Ÿ”ข Meet i, the Counter
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Meet i, the Counter ๐Ÿ”ข

That little i in your loop isn't just decoration โ€” it's a variable, and Python fills it with a different number every turn:

for i in range(5):
    print(i)

That prints:

0
1
2
3
4

Two surprises there! Python starts counting at 0, not 1. And range(5) stops before 5, so you get five numbers: 0, 1, 2, 3, 4.

The magic happens when you use i inside an f-string:

for i in range(11):
    print(f"7 x {i} = {7 * i}")

An entire times table in two lines. Try doing that with a pencil. โœ๏ธ

Your mission

  1. Make a variable table and store your favourite number in it
  2. Use a for loop with range(11) so i counts 0 through 10
  3. Use an f-string to print a line for each one, like 8 x 3 = 24

Your code

Press โ–ถ Run to see what your code does!