Understand the idea.
Give instructions in the right order
An algorithm is a precise set of instructions for completing a task. State the starting value, follow the operations in order and identify when to stop. Use the result of one operation as the input for the next operation.
Order matters: starting at , adding , then multiplying by gives . Multiplying first and adding afterwards gives . Instructions such as make it bigger are too vague; say exactly what to add, subtract or multiply.
Make one decision at a time
A decision chooses a route using a clear question. In this flowchart, ask whether the input is even. Follow Yes to add four, or No to add one. The arrows lead from the chosen operation straight to Stop.
Test a decision algorithm with inputs that take different branches. Trace one input at a time and record its output. For repeated instructions, also specify how many repetitions to make or a condition that ends them, so the algorithm has a clear stopping point.
See the method in action.
Trace ordered operations
Start at 6. Add 3. Multiply the result by 5.
Worked solution
- 1
Start with the given input.
The starting number is the value before either instruction has been applied.
- 2
Add three first.
The first instruction changes the current value from six to nine.
- 3
Multiply the new value by five.
The multiplication acts on the result of the addition, so the output is 45.
45
Follow a decision
Use the flowchart with inputs 8 and 7.
Worked solution
- 1
Test the input eight.
Eight makes complete pairs, so it follows the Yes branch for even numbers.
- 2
Follow its chosen branch and stop.
The Yes branch adds four, giving output 12 without using the other branch.
- 3
Test the input seven.
Seven leaves one unpaired object, so it follows the No branch.
- 4
Follow its chosen branch and stop.
The No branch adds one, giving output 8; each input takes only its matching branch.
Input 8 gives 12. Input 7 gives 8.
Try it yourself.
Check your understanding
Start at 10. Subtract 2, then double. What is the output?
Show answer & reasoning
16
Subtract first: . Then double that result: . Doubling the original ten instead would ignore the first instruction.
Keep practising
6 worksheet questions · 11 marks
Read the questions online
- Start at 5. Multiply by 3, then add 2.2 marks
- Start at 5. Add 2, then multiply by 3.2 marks
- Start at 4. Repeat add 3 exactly three times.1 mark
- If the input is greater than 20, subtract 5; otherwise add 5. Find the outputs for 25 and 20.2 marks
- Start at 6. Add 2 until the result is greater than 10, then stop. Write every number reached.2 marks
- An instruction says: start at 1 and keep adding 1. What is needed to make it finish?2 marks
Read the worked solutions
Equivalent correct methods earn the corresponding marks. Include units where asked.
- Start at 5. Multiply by 3, then add 2.2 marks
.
.
17 - Start at 5. Add 2, then multiply by 3.2 marks
.
.
21 - Start at 4. Repeat add 3 exactly three times.1 mark
.
13 - If the input is greater than 20, subtract 5; otherwise add 5. Find the outputs for 25 and 20.2 marks
25 is greater than 20, so .
20 is not greater than 20, so .
20 and 25 - Start at 6. Add 2 until the result is greater than 10, then stop. Write every number reached.2 marks
10 equals 10; it is not greater.
The first number greater than 10 is 12.
6, 8, 10, 12 - An instruction says: start at 1 and keep adding 1. What is needed to make it finish?2 marks
Without a stopping condition the additions continue.
Any clear reachable stopping condition is acceptable.
A stopping instruction, such as stop when you reach 10.
Curriculum reference & lesson scope
Australian Curriculum v9 and SA Curriculum Mathematics 2026
Additive/multiplicative rules; steps/decisions; predicting and explaining patterns.
Official curriculum source ↗