Tray A is labelled five or more. Tray B is labelled below five. You test a sorting rule with cards numbered 4, 5 and 6. Four and six land exactly where you expect—but five doesn’t.
That small surprise gives students a useful question to investigate: what happens when the number is equal to the boundary? The rule “greater than five” isn’t wrong by itself. It simply doesn’t match this particular goal, because “five or more” includes five.
Set up the sort
Make three number cards: 4, 5 and 6. Put them in an unprocessed pile in that order, with 4 ready to be taken first. Set out the two empty, labelled trays.
Before beginning, check that students can distinguish greater than, less than and equal to. In pairs, one student can follow the instructions while the other records whether each comparison is true or false and where the card goes. The goal must stay visible; clear requirements and test cases help us check whether an algorithm does what was intended, as explained in ACARA’s Technologies guidance.
Follow the rule exactly
A comparison produces a true or false result, and that result decides which branch to follow. The Digital Technologies Hub’s comparison and branching guidance places this kind of decision within Years 3–4 introductory programming.
- If no unprocessed cards remain, stop.
- Take and remove the next card from the unprocessed pile.
- If its number is greater than five, put it in tray A. Otherwise, put it in tray B.
- Return to step 1.
The student executing the algorithm should obey the written comparison, even when a tray label suggests another destination. The observer records what actually happens without correcting the rule halfway through.
Watch what happens to five
| Card | Is it greater than 5? | Actual tray | Intended tray |
|---|---|---|---|
| 4 | False | B | B |
| 5 | False | B | A |
| 6 | True | A | A |
Four matches the goal because it is below five. Six also matches because it is greater than five. Five reveals the mismatch: it isn’t greater than five, so the rule sends it to B, but the stated goal includes it in “five or more”. Testing only 4 and 6 wouldn’t expose this particular problem.
Change one comparison and try again
Replace greater than five with greater than or equal to five, written as ≥ 5. Leave the true branch, the otherwise branch, the repetition and the stopping instruction unchanged.
Empty both trays, restore the cards in the same order and run the whole algorithm again. For 4, “4 ≥ 5” is false, so it goes to B. For 5, “5 ≥ 5” is true, so it goes to A. For 6, “6 ≥ 5” is true, so it also goes to A. Using the same cards makes the effect of the changed comparison easy to see. The observed mismatch has led to one targeted change, which can now be checked against the original goal.
Don’t lose the stopping step
Each pass removes one card from the finite unprocessed pile. After 6 is placed, step 4 returns to step 1, the empty pile is detected and the algorithm stops. You can also begin with an empty pile to test immediate stopping.
This activity brings together sequencing, comparison-based branching and iteration described in the Years 3–4 Digital Technologies content on ACARA’s Robotic helpers page. Students are manually tracing a paper model of an algorithm; they haven’t implemented a digital program.
Return to the five card
Ask, “What changed in the instruction, and why did only five move trays?” Listen for the connection between equality and the phrase “five or more”. The three cards reveal this comparison mismatch clearly, although they can’t show that every possible error has been found.