An algorithm is a clear set of steps and decisions. A classification algorithm asks yes/no questions about a shape's sides and angles, in an order that gives each shape its own name, and you test it on one shape of every class.
How do bird-watchers name a bird they have never seen before? They follow a key of yes-or-no questions.
An algorithm is a precise set of steps, including decisions, that always gives the right result. A classification algorithm sorts shapes into classes by asking yes/no questions about their attributes (sides, angles, parallel sides). It can be drawn as a flowchart or a decision tree, or written as numbered steps (pseudocode).
Two things make one work: every shape reaches exactly one answer, and the questions are in the right order.
How this lesson works: Predict, Try, Investigate, Modify, Practise, Make
Predict: Read the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
Try: Try it on the board and compare the result with your prediction.
Investigate: Work out why it happens, one step at a time.
Modify: Change the problem on purpose and see what happens.
Practise: A few on your own, to check you have it.
Make: Make your own problem using what you have learned. Expect a few tries; that is normal.
Make your prediction first. Help opens once you've locked it in.
Info
A bird key
This is the kind of key bird-watchers use. You answer each question, follow the arrow, and end up at a name. Try it for a galah, which is pink and grey: which questions do you answer on the way?
Later you'll build keys like this for shapes, and at the end you'll come back and put this one to the test.
A key for five common Australian birds
PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
An algorithm with one question
Would you be happy with that answer from a sorting machine?
TryTry it on the board and compare the result with your prediction.
Follow the algorithm
Read each shape's description, answer the question, and press the button to go on.
Try it yourselfYour edits are saved in this browser.
Follow this two-question algorithm for each triangle in turn. How does it name the 4, 4, 4 triangle? Compare with your prediction.
Use the board. This ticks when you get there.
InvestigateWork out why it happens, one step at a time.
What goes wrong
Which class does the algorithm confuse with another?
Read Pia's working. What name did the rectangle get?
Pia tests her algorithm on a rectangle. Click the line where she wrongly decides it works.
ModifyChange the problem on purpose and see what happens.
Design and test
Measure first. Which question is the most specific?
Try it yourselfYour edits are saved in this browser.
Put the steps of a triangle algorithm in order.
Pieces (click to add)
Your program
Run the fixed algorithm on all three triangles. Does every one get the right name?
Use the board. This ticks when you get there.
Run the quadrilateral algorithm on all five shapes.
Use the board. This ticks when you get there.
PractiseA few on your own, to check you have it.
Tracing algorithms
Try it yourselfYour edits are saved in this browser.
In the fixed triangle algorithm, how many questions does a scalene triangle need before it is named?
The quadrilateral algorithm asks at most how many questions before naming any of its five shapes?
Review: a triangle has angles 90°, 45° and 45°. How many of its sides are equal?
MakeMake your own problem using what you have learned. Expect a few tries; that is normal.
Back to the bird key
The bird key from the start
Use the key above. The myna's colours are from the Australian Museum.
Which bird answers no to every question? Where does the last 'no' send it?
A real key also has to work for plain birds: female superb fairy-wrens are mostly brown, not blue (Australian Museum). Draw the key in your book, then follow one through it.
Stretch: write an algorithm that sorts triangles by their angles into acute, right-angled and obtuse. Test it on one triangle of each class, and say how it works to a partner.
One box for each question. Draw an arrow out for yes and another for no.
Another hint
Write her answer next to each question as you go.
Draw your fixed key on paper as a flowchart: the five questions, then 'Bright blue on its head?' before the fairy-wren, with 'not in this key' on its no. Now take a female superb fairy-wren, mostly brown, and follow her through. Where does she end up, and why?
Work it out on paper first, one step per line. Then choose the reasons below.
Put your page beside this and compare, step by step.
A model solution
Mostly black and white? No. she is mostly brown
White with a yellow crest? No. she has no crest
Pink and grey? No. she is brown
Mostly red? No. she is brown, not red
Bright blue on its head? No. a female's head is brown
She ends at 'not in this key'. she says no to every question, and the blue-head question only fits the males
Check your page
Lesson done. You've finished every step you need.
Now you can
Follow an algorithm and say what each decision does.
Put the questions of a classifier in an order that works.
Students follow, fix and test algorithms that classify triangles and quadrilaterals, and describe how each works (AC9M7SP04, nodes 1 and 2). About 40 minutes.
I can follow an algorithm and say what each decision does.
I can put the questions of a classifier in an order that works.
I can test an algorithm on one shape of every class.
Before class
Pilot (Oct 2026): the lesson opens with a real key (five common Australian birds, drawn as a Mermaid flowchart in a short first step) and Make comes back to test it with a bird it was not built for; "Also used in" closes it. The middle of the lesson is unchanged. This pilot tests a Mermaid opening, which decks and worksheets carry; the cost is one extra step pill. Tell us whether it helps.
Do the Run board yourself first. Students need the triangle and quadrilateral classes (Classifying shapes lessons).
The one idea: each shape must reach its own name, so the most specific question comes first. A short algorithm can be wrong; testing on one shape of every class finds it (Pia's mistake).
The board follows the key one question at a time; it is the same tool students use for living things in science. Students design on paper: the Make stretch asks for an algorithm for triangles by angles, drawn as a flowchart or written as numbered steps.
Judging two algorithms for efficiency (fewest questions) and for edge cases (the kite) are wider ideas.
This links to Code: an algorithm written in steps is a program with if and else.
Running the lesson
Predict: ask what the machine should say for the equilateral triangle.
Run: ask which triangle the algorithm gets wrong, and why.
Investigate: ask what test shapes Pia should have used.
Modify: ask students to describe the quad algorithm in words.
Make: back to the bird key. Ask who can find a bird it gets wrong before anyone looks at the options; then ask what every key needs (a way to say 'not in this key'). Then books out: students draw their fixed key as a flowchart and follow a female superb fairy-wren through it, one box at a time, before they pick why she ends at 'not in this key'. Ask what the key should do with her.
The hard part (on purpose)
Ordering the questions. Ask students to say which shape each question separates before they put it in a position.
When students get stuck
A student asks the general question first. Ask: What would a square be called by this question? Fix: Ask the most specific question first.
A student tests on one shape. Ask: Which classes has your test not reached? Fix: Test one shape of every class.
A student has a path with no end. Ask: Where does a 'no' lead? Fix: Every yes and every no must lead on to another question or a name.
Stretch and support
Stretch: Compare two correct algorithms for the same job: which asks fewer questions on average? Then write the triangle algorithm in Python with `if` and `else`.
Support: Give students the questions on cards and ask them to lay out the order before they use the board.
Where it leads
This completes AC9M7SP04.
Where it leads: algorithms in code (the Code pathways), flowcharts for other decisions, and decision trees in Probability.
A bird key: Following a real key for one bird shows what a classification algorithm is for, before the lesson builds one for shapes; Make comes back to this key and tests it.
an algorithm with one question: Committing to what a one-question triangle algorithm says about an equilateral triangle shows whether they check the order and the cases.
follow the algorithm: Following a two-question algorithm on three test triangles shows the order that gives the equilateral triangle its own name.
what goes wrong: Order and missing cases are the problems; the general question first gives a less specific name (Pia); testing needs one of each class.
design and test: Ordering the decisions of a triangle algorithm, running the quadrilateral one, and finding the shape it cannot handle shows design, tracing and limits.
tracing algorithms: Counting questions and tracing the path for a shape, mixed; the number of questions a key needs is the planted idea; the triangle review keeps classes fresh.
back to the bird key: Testing the bird key from the start with a bird it was not built for puts the lesson's two checks on a real key: every case reaches exactly one right answer, and the last 'no' is where untested keys fail.