Worked example · Maths · Year 7

Number machine flowcharts

DCF: Data and computational thinking → Problem-solving and modelling

What this is — and your answer key

A secure Year 7 response, annotated against the success criteria. Every number on this sheet is the correct answer, so you can mark straight from it. The quick checks: Machine A turns 5 into 17; the backwards machine is + 3 then ÷ 4; the mystery machine is × 3 then + 2; starting at 7 takes 16 steps; the mind-reading machine always gives 5.

Step 1 — Machine A

INAfter × 4After − 3OUT
2855
5201717
10403737
00−3−3

0 was the tricky one: 0 × 4 is still 0, and 0 take away 3 goes below zero, so the answer is negative 3.

Each box is done in order and the middle column shows it, including the negative answer. Evidences criterion 1.

Step 2 — backwards

OUTWorkingIN
2929 + 3 = 32, then 32 ÷ 4 = 88
11 + 3 = 4, then 4 ÷ 4 = 11
9797 + 3 = 100, then 100 ÷ 4 = 2525
OUT + 3 ÷ 4 IN

I checked 8 by running it forwards: 8 × 4 = 32, 32 − 3 = 29. That is the OUT I started with, so 8 is right. The backwards machine has the opposite boxes in the opposite order: the last thing Machine A did was take away 3, so the first thing to undo is to add 3.

Undoes the last box first, uses the inverse of each operation, and checks one answer by running it forwards again. Evidences criteria 1 and 2.

Step 3 — does the order matter?

INMachine B: + 3 then × 2Machine C: × 2 then + 3B − C
11 + 3 = 4, 4 × 2 = 81 × 2 = 2, 2 + 3 = 53
44 + 3 = 7, 7 × 2 = 144 × 2 = 8, 8 + 3 = 113
1010 + 3 = 13, 13 × 2 = 2610 × 2 = 20, 20 + 3 = 233

Machine B is always 3 more than Machine C. In Machine B the 3 goes in before the doubling, so the 3 gets doubled too and becomes 6. In Machine C the 3 goes in after the doubling, so it stays as 3. Both machines double my number, but B adds 6 and C adds 3, and 6 − 3 = 3. So the order of the boxes matters, and it would matter for any starting number.

Spots the pattern and explains it by following what happens to the 3 in each machine, not just by describing the answers. Evidences criterion 3.

Step 4 — the mystery machine

When IN goes up from 1 to 2, OUT goes up from 5 to 8, which is 3 more. So the machine multiplies by 3. 1 × 3 = 3, and OUT is 5, so the add box must be + 2.

The machine is: IN → × 3 → + 2 → OUT

Checking every pair: 1 × 3 + 2 = 5 ✓   2 × 3 + 2 = 8 ✓   4 × 3 + 2 = 14 ✓   10 × 3 + 2 = 32 ✓

Prediction: 100 × 3 = 300, 300 + 2 = 302.

Uses the clue to find the multiplier, then works out the add, and tests the answer on all four pairs before trusting it. Evidences criterion 4.

Step 5 — the halve-or-triple machine

INNumbers written down, in orderSteps
33, 10, 5, 16, 8, 4, 2, 17
66, 3, 10, 5, 16, 8, 4, 2, 18
77, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 116
1212, 6, 3, 10, 5, 16, 8, 4, 2, 19

6 is even, so the first step halves it to 3 — and from then on it does exactly what 3 did. That is why 6 takes 7 + 1 = 8 steps. I chose 12 because it halves to 6, so I predicted 8 + 1 = 9 steps before I did it, and I was right. Doubling any starting number always adds exactly one step.

7 surprised me: a small number, but it climbed as high as 52 before it came down.

Every number is written down, steps are counted as trips round the loop (not as numbers written), and the pupil uses a pattern to predict and then checks the prediction. Evidences criterion 5.

Step 6 — the mind-reading machine

INDouble it+ 10Halve itTake away IN
481895
112232165
255060305

(a) It always gives 5. Doubling and then halving cancel each other out, so after the halving box you have your own number back — plus half of 10, which is 5. Then you take your own number away, and only the 5 is left. Whatever you start with gets removed at the end, so it never matters.

(b) Change + 10 to + 14. Half of 14 is 7, so 7 is what is left over. Test with 6: 6 × 2 = 12, 12 + 14 = 26, 26 ÷ 2 = 13, 13 − 6 = 7 ✓

Explains the trick by what each box does to the starting number, then uses that understanding to change one box and tests the new machine. Evidences criteria 3 and 5.

Why this response is secure