๐Ÿ PyQuest๐Ÿ” Loops Loops Loops ยท ๐Ÿ” Repeat After Me
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Repeat After Me ๐Ÿ”

Want to print something 5 times? You could write five print() lines. Or you could make Python do it:

for i in range(5):
    print("Python is cool! ๐Ÿ")

That's a for loop. It means "do the indented part 5 times."

Look closely, because the shape is the same as if:

  1. The for line ends with a colon :
  2. The next line is indented โ€” that's the part that repeats

range(5) is Python counting out five turns for you. Change the number, change how many times it runs. range(100) would run it a hundred times, and you'd still only write two lines. ๐Ÿ˜Ž

Your mission

  1. Use a for loop with range() to print a message exactly 7 times
  2. The message is totally up to you

Your code

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