Welcome gate
Rover reaches a gate that may be open or blocked. Use the same sensor program in both versions of the map, then send Rover to the marked tile. This version has a clear tile ahead. The same program must also handle the blocked version.
This is the open map. The same program must reach the goal on its paired blocked map too.
Paired world to design for · start map
Start: column 2, row 3, facing E. Rover now: column 2, row 3, facing E. Goal: column 2, row 4. Walls: column 3, row 3.
Use if front_is_clear(): and else:. Indent each branch’s actions.
Allowed Python syntax
Allowed: if front_is_clear():, else:, move(), turn_left(), turn_right(), comments and blank lines.
Actions take empty parentheses. Both branches need an action. Nested checks are bounded to three levels. Variables, loops, elif and other conditions are outside this workshop.
FLOWCHART · INSPECTED PATH
Run a short allowed program to check its syntax and reveal its flowchart. Predict first; then inspect each event.
PLAN VIEW
Flowchart
How to read this chart
Follow the arrows from Start. Rectangles show actions. A diamond asks a question: follow the labelled TRUE or FALSE path. Only the matching path runs; both paths merge before the next step. Stacked branches are alternatives, not consecutive steps.
A Repeat uses a counter: set i = 0, check i < count, run the whole body, add one, and return to the check. Repeat 5 means five body visits; repeat 0 skips the body. The Python spelling for i in range(5): visits counter values 0, 1, 2, 3, 4: five visits. The trace numbers those visits 1–5. The Python loops workshop supports this bounded for/range form; other workshops keep their own allowed syntax.
Counter setup, increment and exit arrows explain the loop; they are conceptual, not extra recorded trace events. Highlighting follows actual actions, decisions and beginning-of-iteration markers. End is highlighted only after an inspected run finishes normally. For Python, the diagram’s counter setup and increment explain repetition; they are not executed assignments. A zero-count range visits no values and does not assign a new value to Python i.
Design on screen or sketch on paper
Edit the short program in the Python editor. Run checks its syntax before drawing the chart; your prediction stays frozen for that run. Worked examples show separate authored programs.
- Draw a rounded Start. Connect each step with an arrow.
- Put each action in a rectangle, in the order it happens.
- For IF, draw a diamond with a yes/no question. Label both TRUE and FALSE arrows, write each branch, then merge them.
- For a loop, mark the repeat count and draw its whole body. Show a counter starting at 0, a counter-less-than-count question, and a YES arrow into the body.
- After the body, add 1 to the counter and draw an arrow back to its question. The NO arrow leaves the loop. A count of 0 goes straight to NO.
- Finish with a rounded End. Trace with a finger or pencil; note position, heading and any changing values after each action.
Keep your paper sketch beside you; no photo or upload is needed. Robot doodles are optional. Magnificent robot hats are also optional.
Run an allowed program to see its actions and decisions here.
MAP · OPEN AHEAD
Predict Rover’s route
Start: column 2, row 3, facing E. Rover now: column 2, row 3, facing E. Goal: column 3, row 3. Walls: none.
Help for this sensor puzzleHints build in steps. Worked help needs a deliberate choice.
Highest help used on this case in this session: none. Worked examples and solutions count as help for both maps in this pair.