Python Quest  /  Mission 8
Loading Python...
World 1 · Mission 8

Maze Control

Bolt must pass through five maze checkpoints. Most checkpoints are clear, but checkpoint 2 contains a wall. Combine a for loop with an if/else decision so Bolt knows when to move and when to turn.

Maze Scanner

Your program will process each checkpoint in order.

Checkpoints processed
0 / 5
Step 0
⬆️
WAITING
Step 1
⬆️
WAITING
Step 2
🧱
WALL
Step 3
⬆️
WAITING
Step 4
🏁
EXIT
Maze waiting for instructions.
Mission objective

Combine repetition and decisions

Use a loop to process all five maze steps. Inside the loop, check whether step == 2.

At checkpoint 2, Bolt should turn_right(). At every other checkpoint, he should move().

Use for step in range(5)
Check whether step == 2
Complete all five maze decisions

Check your understanding

If the wall were moved from checkpoint 2 to checkpoint 4, how should the condition change?

Mission complete!

You combined repetition and selection: a loop handled each checkpoint while an if/else statement chose the correct action.

Your Python code

Complete the decision