← Course homeCode clears when you leave
MISSION 11 · COMBINED CONTROL

Surprise Delivery Route

Rover arrives at small corridors that may be open or blocked. Use one sensor choice and a while loop to deliver on varied maps, then test a layout that exposes the rule’s limit.

What’s saved:Code, plans and predictions clear when you leave or reload. If you turn saving on, only which challenges you finished and how much help you used is kept on this device. Test accounts also share it, and lesson timing, with the site’s maintainer.
◇ Your mastery goalCombined control

Complete all 4 required tasks with a correct prediction, an inspected trace and an explanation that shows the concept. At least 1 must be independent checks, without answer-level help.

✓ Qualifying tasks: 0 / 4◎ Independent checks: 0 / 1 required
Handle the gate and corridor

At an open gate, follow the corridor. At a blocked gate, turn right and follow the other corridor.

0 / 4 maps checked

Your job: Use the first sensor result to choose a branch, then use a while loop to continue safely along that branch.

Count carefully: successful moves change the pose. IF and WHILE sensor checks read the tile before a branch or loop body; checks do not add moves. FOR visit markers are not sensor checks. A run safety limit is an emergency stop, not the normal way a sensor loop finishes.

Rover must travel east through 2 open tiles and stop at the wall.

2
Predict before RunUse one-based column and row. Include the final false check when a while loop stops.
3
Write the control programUse the lesson’s bounded Python control syntax.

Allowed subset: move(), turns, if/else front_is_clear(), for i in range(n) and while front_is_clear(). Loops and branches contain fixed robot actions or supported nested control.

Syntax and safety guide

Only the supported, bounded grammar runs in the isolated lesson runner. The parser validates untaken branches too. No variables, imports, arbitrary Python or goal-search helper is available. A 128-event safety limit stops runaway experiments; a sensor loop should normally exit on a false check.

FLOWCHART · INSPECTED PATH

Run a checked program to see its real control path.

Flowchart

✓ Inspected path ◆ Current step
Read or sketch this program

Start and End are rounded. Rectangles are actions. For IF, follow the TRUE or FALSE branch and merge afterward. WHILE checks before every whole body visit; TRUE runs the body and returns to a fresh check, FALSE leaves it. FOR repeats the whole body its range count, including zero visits.

Draw the same shapes and labelled arrows on paper before coding. Trace position and heading after every action. A sensor checks only at its own diamond: two moves in one body are not two checks. A safety limit or collision stops an experiment without normal End.

Highlights and ✓ counts show only inspected events. Counted-loop arrows explain order; no extra counter or exit events are invented. Your sketch stays with you; no upload is needed.

Run an allowed program to draw its chart.

MAP · CURRENT POSE

Predict Rover’s route

1, 1 · E

Start: column 1, row 1, facing E. Rover now: column 1, row 1, facing E. Goal: column 3, row 1. Walls at column 4, row 1.

Walls are listed by one-based column and row.

Evidence still neededUse the same algorithm across the required maps. Keep each prediction and trace attached to that version.
Contextual HelpHints build one step at a time; answer-level help is a deliberate choice.

Highest help on this map and stage: none

For Further Reading and Exploration

These are outside sites with their own rules. You will see a notice before you leave. Pick one, not all.

  • Automate the Boring Stuff with Python

    Free book to read online. Short, useful programs show how real scripts mix decisions and loops.

    • Hands-on
    • May need an install
    • Ask an adult
  • CS50's Introduction to Programming with Python

    Free Harvard course with videos and notes. Problem sets let you practice mixing conditionals and loops in small programs.

    • Hands-on
    • Advanced
    • May count visits
  • draw.io diagram maker

    Draw your delivery route plan as a flowchart before you code. Seeing the plan helps you spot missing steps. Save on your device.

    • Hands-on
  • Raspberry Pi Foundation Projects

    Step-by-step Python projects. Pick one that mixes choices and repeats. Some need hardware, so check the parts list first.

    • Hands-on
    • May count visits