Code Lab: free coding puzzles for kids and teens

Program Sam to reach the safe. Tap arrows, loops, if blocks and functions, see every program as real Python, and get help that explains exactly what went wrong.

🧪 Open the Code Lab

8 zones, from first steps to Python

  1. 👣 Step by Step

    Algorithms and sequence · Ages 4+ · 6 levels

    Children learn that computers follow instructions exactly, in order. Ask: “What do you think will happen?” before they press Run.

    Play Step by Step

  2. 🐞 Fix the Bug

    Debugging · Ages 5+ · 5 levels

    Debugging means finding and fixing mistakes. Getting it wrong is part of the process, so praise the fixing, not just the first try.

    Play Fix the Bug

  3. 🔁 Loop It

    Repetition (loops) · Ages 7+ · 6 levels

    Loops (also called repetition or repeat blocks) save writing the same thing over and over. Spot loops in real life: “stir 10 times”, “brush each tooth”.

    Play Loop It

  4. 🔀 If This, Then That

    Selection (if / else) · Ages 8+ · 4 levels

    Selection means the program makes a decision: if something is true, do one thing, else do another. Real life: “If it’s raining, take a coat, otherwise wear sunglasses.”

    Play If This, Then That

  5. 🧩 Make Your Own Move

    Functions (procedures) · Ages 10+ · 3 levels

    Functions (sometimes called procedures) give a name to a set of steps, so you can reuse them. Real life: a recipe that says “make the sauce” instead of listing every step again.

    Play Make Your Own Move

  6. 🏗️ Master Coder

    Combining loops, ifs and functions · Ages 11+ · 6 levels

    This is “nesting” and “decomposition”: breaking a big problem into a pattern, then a pattern inside that pattern. It’s how real programmers keep code short and readable.

    Play Master Coder

  7. 🐍 Read Real Code

    Text code (Python) · Ages 11+ · 10 questions

    From about age 11, schools move from blocks to typed code, usually Python. Reading code and predicting what it does is one of the best ways to learn it.

    Play Read Real Code

  8. 🧑‍💻 Python Pro

    Lists, nested loops and logic (Python) · Ages 13+ · 10 questions

    These match what students meet at GCSE Computer Science: lists and indexes, nested loops, dictionaries, string slicing, modulo, Boolean logic and spotting off-by-one bugs.

    Play Python Pro

Never stuck for long

New to coding words? Read coding in plain English.