English

Guarded number flowchart

Execute a guarded loop while recording the current number separately from the instruction.

Adult planning suggestion: about 9–12 · Logic & rule checking · Cooperation & communication

Players
Teams of three
Time
12–18 minutes
Materials and quantities
Per team: a flowchart, one large number marker and a trace log. Starting number must be 1–6.

30 pupils: ten teams of three, reader, value mover and trace checker; swap roles after two starting values.

Prepare

Use this precise program: START with a whole number 1–6 → TEST “is n less than 4?” → if yes, ADD 2 then return to TEST; if no, SUBTRACT 1 then STOP. Mark both the instruction location and current n. The comparison is strictly less than 4, not less than or equal.

Play

One pupil reads the current box, one updates the number only at ADD or SUBTRACT, and one logs the value and chosen branch. A TEST never changes n. ADD always returns to TEST; SUBTRACT always leads to STOP. Do not repeat subtraction or jump to stop immediately after addition.

Example

Start 1: test yes, add to 3; test yes, add to 5; test no, subtract to 4, stop. Start 2: add to 4, test no, subtract to 3, stop. A final value of 3 is allowed; the program does not test it again after STOP.

Finish

Run starts 1,2,3,4,5,6 and compare outputs 4,3,4,3,4,5. For this restricted input range, at most two additions occur before the stopping branch. Explain one unchanged value at a test and one changed value at an arithmetic step; no fastest-team score.

Adapt

Begin with start 4 so the no-branch happens immediately. Keep a number line 1–6 visible and let an adult read the condition. Values outside the supplied starting range form a different task and are not required.

Aim: Execute a guarded loop while recording the current number separately from the instruction.

Practice within this activity: Separating control flow from stored value, applying a strict comparison and recognising a stopping state.

Adult observation: Ask why output 3 after a stop is not sent back to the condition, even though 3 is less than 4.

Mechanism and adaptation: Our version uses condition-controlled repetition and an explicit stop. Examples and print materials are separately written; the earliest inventor is not established here.

Reference checked 24 October 2026: Python Software Foundation · The while statement — Technical background for repeating while a condition holds. Our paper number program is original; the language reference is not a child lesson or learning-effect study.

Goals describe observable activity choices, not measured long-term gains or institutional endorsement.

Free alternatives: Draw four labelled boxes and arrows on scrap paper; use handwritten number cards.

Buying recommendations reserved; no purchase required.

Printable materials

Preview at 100% scale, with browser headers and footers off. Cut with suitable help. Keep host keys separate. This is a manual tabletop kit, not an online opponent, automatic judge or solver.

Player guarded flowchart

START: n is 1–6 → TEST: n < 4?

YES → n = n+2 → return to TEST

NO → n = n−1 → STOP

A test changes only the instruction location, not the number. STOP has no outgoing arrow.

Player value and branch log

StartBox / branchValue after box
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________

Teacher instructions and checked example · separate

30 pupils: ten teams of three, reader, value mover and trace checker; swap roles after two starting values.

Per team: a flowchart, one large number marker and a trace log. Starting number must be 1–6.

Draw four labelled boxes and arrows on scrap paper; use handwritten number cards.

Print only the relevant player pages; keep this teacher page separate. Read the full web rules before leading. A helper may write or move pieces, and anyone may pause or pass. No classroom or physical-printer trial is claimed.

StartValues until stopOutput
11→3→5→44
22→4→33
33→5→44
44→33
55→44
66→55

Tests do not appear as changed values in this compact list. A stopped value 3 is not tested again.

Related activities

Classroom games · All 130 games