Module 5: Repeating Things

Let the computer do repetitive work. 9 Python coding games, each with short narrated videos and six levels.

This module is part of the full course. Unlock all 79 games for $9, or try Module 1 free.

  1. 29 while loops · Bucket Brigade
    Keep carrying water until the tank is full. Your code decides when to stop.
  2. 30 Looping until the answer is right · Password Door
    The vault door keeps asking until the visitor gives the right word, or walks away.
  3. 31 for loops and range() · Fence Builder
    Each pass of the loop hammers in another post. Tell it how many, and watch the fence grow.
  4. 32 Counting by steps and backwards · Rocket Countdown
    Run the launch countdown. range() can start anywhere, skip numbers, and even count backwards.
  5. 33 Counting and adding up · Piggy Bank
    Coins drop in one at a time, and the total climbs as your code runs.
  6. 34 Finding the biggest and searching · Fishing Contest
    Fish arrive one by one. Your code remembers the biggest so far, and watches for a rare one.
  7. 35 break and continue · Mine Cart
    Ride down the tunnel. Skip the rocks, and stop as soon as you reach the gold.
  8. 36 Loops inside loops · Pixel Tiles
    Lay rows of tiles to match a picture. A loop inside a loop can draw a whole grid.
  9. 37 Project: Guess the Number · Guess the Number
    Your third real program: the computer picks a number, and the player keeps guessing until they find it.