Champions Code Lab

Write code to guide your Champion. Plan it, test it, fix it!

Every world starts with short Learn stations, then 16 coding levels. Progress saves on this device.

📘 Learn first (3 in a row finishes a station)

🧩 Levels (finish one to unlock the next)

3 in a row: 123
⭐ Station complete!

Your code

🛠️ Maze Maker

Tip: tap something again to remove it, or use the 🧽 Eraser.

📄 Python cheat sheet

Python reads your code from top to bottom. Lines inside a loop, if, or def must be indented 4 spaces. Lines that start with for, while, if, elif, else, or def end with a colon :

Moving

move_forward()Move one square the way you face. move_forward(3) moves 3.⬆️ Move forward
turn_left()
turn_right()
Turn to face a new way. You stay on the same square.↺ ↻ Turn
move_right() and friendsMove right, left, up, or down no matter which way you face. Used in Show Python for arrow blocks.➡️ ⬅️ ⬆️ ⬇️

Loops

for i in range(4):
    move_forward()
Repeats the indented lines 4 times.🔁 Repeat 4 times
while not at_flag():
    move_forward()
Keeps repeating until the Champion reaches the flag.🔁 Repeat until 🚩

Checks and decisions

if path_ahead():
    move_forward()
elif path_left():
    turn_left()
else:
    turn_right()
Checks the path. Runs the first part that is True. else runs when nothing above was True.❓ If / Else
path_ahead() path_left() path_right() at_flag()Checks that answer True or False. Use them with if or while.

Variables and math

steps = 1
steps = steps + 1
steps += 1
steps -= 1
A variable is a named box for a number. += adds to it, -= takes away.📦 steps
move_forward(steps)Moves forward as many squares as the variable holds.
print("Hi!") print(steps)Shows a message or a value in the output box.

Functions

def hop():
    turn_left()
    move_forward()

hop()
def makes a function. Its lines run only when you call it with hop(). Put the def above the code that uses it.🧩 Function

📏 Angle guide

When your Champion walks all the way around a shape and ends up facing the way it started, it has turned one full circle: 360°. So for a shape with corners that are all the same:

turn angle = 360 ÷ number of corners

Turn angle vs. inside angle

The Champion turns at the outside of each corner. A triangle’s inside corner is 60°, but the Champion turns 120°, because 180 − 60 = 120. Turn angle = 180 − inside angle.

Common turns

Tip: press 📐 Protractor to see angle marks around your Champion. Blue numbers are right turns, orange numbers are left turns.

💡

You used a big hint, so this level can earn up to 2 stars this time.

🔗 Share your maze

Give this code to a friend. They tap “Friend’s maze” in Maze Maker and type it in.

📥 Play a friend’s maze

Type the maze code your friend gave you.

Choose your Champion

🔒 Teacher tools