Algorithms for shapes: a week of ready-to-teach maths
Five lessons for Year 7 Space. Print this pack and the week is prepared: each day has a one-page plan and a student worksheet with practice and a stretch section, plus sixteen shape cards, yes-or-no question cards, a mini-check and every answer with its working.
Start here: five minutes to Monday
- Skim the week at a glance on the next page.
- Print the five days. Each day is two A4 sheets: a plan and a worksheet.
- Print the two cut-out sheets at 100%, one set per pair: the shape cards (every day) and the question cards (Days 1, 3 and 4).
- Open the free interactive unit on the board. Every plan says which picture to show and which buttons to press.
- Teach straight from the plan. Timings, talk prompts, misconceptions and worked answers are all on the one page.
The idea in plain words
An algorithm is a list of steps and decisions that anyone can follow and always get the same result. To sort shapes, each decision is a yes-or-no question about an attribute: does it have 4 sides, are all its sides equal, is there a right angle. Drawn as a decision tree, every shape follows one path to one name. The same algorithm can be written as numbered steps, run on a whole set of shapes at once, and improved: a better order of questions can do the same job with fewer questions.
One day, one lesson
The five lessons fill a week of maths, one lesson of about 60 minutes a day. Run them in order: each day stands on the one before. Every plan marks a split point for two shorter sessions, and every worksheet ends with a stretch section for students who finish early.
How we name shapes
An algorithm should give each shape its most exact name, so a square comes out as a square even though it is also a rectangle and a rhombus. In this pack a trapezium has exactly one pair of parallel sides and a kite has no parallel sides, and isosceles means exactly two equal sides. On the cards, ticks mark equal sides and a small square marks a right angle.
The week at a glance
One lesson a day for a week. Each day stands on the day before, so run them in order.
| Day | Lesson | Students learn and do | On screen and on the desk |
|---|---|---|---|
| 1 | Decision trees | Run shape cards through a decision tree, build a tree that tells seven quadrilaterals apart, and find the cards a faulty tree names wrongly | A classification decision tree; shape and question cards |
| 2 | Algorithms as steps | Trace numbered steps and decisions on shape cards, find why one order of steps gives wrong names, and write a tree as steps | The algorithm as steps; shape cards |
| 3 | Designing an algorithm | Design and test an algorithm that names any triangle by its sides and by its angles, and draw it as a flowchart | Trace the algorithm step by step; triangle cards |
| 4 | Sorting a set | Sort all sixteen cards with a two-question algorithm into a Carroll diagram and a Venn diagram, and write the algorithm | Sorting a batch into bins; shape and question cards |
| 5 | Improving and describing | Count the questions two trees need, fix and test algorithms, and describe one clearly enough for someone else to follow | The order of questions matters; self-check quiz as a class game |
How the week builds
Day 1 runs and builds decision trees; Day 2 writes the same logic as numbered steps; Day 3 designs and tests a new algorithm from scratch; Day 4 runs an algorithm on a whole set; and Day 5 improves algorithms and describes them for others. It builds on classifying shapes by their properties (AC9M7SP02), and it leads into algorithms that test for congruence and similarity in Year 8 (AC9M8SP04).
Materials for the week (one trip)
- From the classroom: pencils, rulers, protractors, scissors, this pack printed at 100%.
- Cut-out sheet 1, one set per pair: 16 shape cards (every day); keep them in an envelope between lessons.
- Cut-out sheet 2, one set per pair: question cards, blank cards and yes / no labels (Days 1, 3 and 4).
- Large paper for drawing decision trees and flowcharts (Days 1 and 3).
Words for the word wall
algorithm, step, decision, input, output, decision tree, branch, flowchart, trace, sort, classify, attribute, Carroll diagram, Venn diagram, efficient, test case, parallel, right angle, regular, concave
Dear families
This week in maths, Year 7 is designing algorithms: step-by-step instructions, made of yes-or-no questions, that sort and name shapes so that anyone who follows them gets the same answer.
Try this at home
- Play “Guess my shape”: think of a shape; the other person may only ask yes-or-no questions about its sides and angles.
- Write the steps for a small everyday job, such as making toast, and test them by following them exactly as written.
- Sort the cutlery drawer or a pile of coins with two questions, and say what the questions were.
- Ask: what is the fewest yes-or-no questions that can always find a secret number from 1 to 100?
Questions this week
Fill one row a day with something you sorted and the yes-or-no questions you used.
| Day | What we sorted | The questions |
|---|---|---|
| Monday | ||
| Tuesday | ||
| Wednesday | ||
| Thursday | ||
| Friday |
Printed from the free seegongsik Algorithms for shapes teaching pack · seegongsik.com/au/y7/space/AC9M7SP04/pack
Decision trees
A decision tree sorts shapes with yes-or-no questions until each reaches a name. Students run cards through a tree, build one for seven quadrilaterals, and find where a faulty tree goes wrong.
We are learning to
- follow a decision tree to name a shape,
- build a tree that gives each shape in a set its own name,
- test a tree and find the shapes it names wrongly.
Success criteria
- I can run a shape card through a tree and say the path it takes.
- I can build a tree that sends every card in a set to its own leaf, and check it card by card.
You need
The worksheet, the shape cards and question cards (one set per pair), and large paper.
Lesson flow (about 60 minutes)
| 10 min | Follow the branches Show the board (see the box). Ask: “The rectangle answered yes, no, yes. Which answer made it a rectangle and not a square?” |
| 30 min | Run and build Part A alone; then pairs split the seven quadrilaterals with the question cards and draw the tree (Part B). |
| 20 min | Test the tree Part C as a class, then pairs; early finishers do Part D. Ask: “How do you know a tree works for every card, not just the ones you tried first?” |
Two shorter sessions instead? Split after Part A; start the second with Part B.
Watch for these ideas
- Answering from how a shape looks instead of its marks: the rhombus is not a square, as it has no right angles.
- Stopping when a leaf still holds two kinds of shape. A tree is finished when each leaf holds one kind.
- Trusting a tree after trying two or three cards. Every card has to be run.
Answers
- Part A: A rhombus; B triangle; D square; F, H and M other quadrilateral; K rectangle; C pentagon.
- Part B: trees vary; check each card reaches its own leaf. One that works: 2 pairs parallel? yes, then all angles 90°? and all sides equal? (square, rectangle, rhombus, parallelogram); no, then a pair parallel? (yes trapezium), then concave? (yes the dart M, no the kite).
- Part C: named wrongly, A square; F, H, M and O rectangle; ask all angles 90°? under both answers, as in Part A.
- Part D: three in the worst case: two questions end in at most 4 leaves, and three in up to 8.
Decision trees
A. Run the cards
Send each card through the tree, answering each question from the card’s marks. Write the leaf it reaches.
| Card | A | B | D | F | H | K | C | M |
| Leaf |
B. Build a tree
Use the question cards to build a tree that gives each quadrilateral card (A, D, F, H, K, M, O) a leaf of its own. Draw your tree here.
C. Check a tree
D. Stretch
- What is the fewest questions a tree must ask, for its worst card, to give all seven quadrilaterals a leaf each? Explain.
Algorithms as steps
The logic of a tree can be written as numbered steps, some of them decisions that stop with an answer. Students trace steps on cards, see that steps in the wrong order give wrong names, and turn a tree into steps.
We are learning to
- trace an algorithm written as numbered steps and record which steps run,
- explain why the order of the steps matters, and fix an order that fails,
- write a decision tree as numbered steps.
Success criteria
- I can list the steps a card runs through and the name it comes out with.
- I can find a card that an algorithm names wrongly, and change the steps so it does not.
You need
The worksheet and the shape cards.
Lesson flow (about 60 minutes)
| 10 min | Steps on the board Show the board (see the box). Ask: “Why does the triangle never reach step 3?” |
| 25 min | Trace Part A in pairs, one reading the steps aloud and one answering from the card; swap after each card. |
| 25 min | Order matters Part B as a class, then Part C on their own; early finishers do Part D. Ask: “The square stopped at step 1. Was its answer wrong, or just not exact enough?” |
Two shorter sessions instead? Split after Part A; start the second with Part B.
Watch for these ideas
- Running every step whatever happens. A decision that stops the algorithm means the later steps never run.
- Thinking a step that comes later can fix an earlier answer. Once an algorithm stops, its answer stands.
- Writing steps that need a human to guess, such as “check if it looks right”.
Answers
- Part A: B and L steps 1, 2, 3, 4, acute-angled; E and P steps 1, 2, right-angled; I steps 1, 2, 3, obtuse-angled.
- Part B: K square, F another quadrilateral, D rhombus, A rhombus. K and D are wrong: the equal-sides test comes first and ignores angles. Fix: test for a square first (right angles and equal sides), then rectangle, then rhombus, then the rest.
- Part C: for example, 1 not 4 sides: count the sides, name it, stop; 2 all sides equal: go to 4; 3 all angles 90°: rectangle, else other quadrilateral, stop; 4 all angles 90°: square, else rhombus, stop.
- Part D: start at 0; add 1 for each corner that is a right angle; after the last, write the count. J 5, C 3.
Algorithms as steps
A. Trace the steps
- Find the largest angle of the triangle.
- If the largest angle is a right angle, write “right-angled” and stop.
- If the largest angle is more than a right angle, write “obtuse-angled” and stop.
- Write “acute-angled” and stop.
| Card | Steps it runs | Name it comes out with |
|---|---|---|
| L | ||
| E | ||
| I | ||
| B | ||
| P |
B. Does the order matter?
This algorithm is meant to name squares, rectangles and rhombuses, and call anything else “another quadrilateral”.
- If all its sides are equal, write “rhombus” and stop.
- If all its angles are right angles, write “square” and stop.
- Write “another quadrilateral” and stop.
(b) Which cards get the wrong name, and why? Rewrite the steps so every card is named correctly.
C. A tree as steps
Write the tree from yesterday’s Part A as numbered steps. Use “go to step …” where the path splits.
D. Stretch
Write an algorithm that counts the right angles of any shape, one corner at a time. Trace it on cards J and C.
Designing an algorithm
Students design an algorithm from scratch: one that gives any triangle a name by its sides and a name by its angles. They write it, test it on the five triangle cards, and draw it as a flowchart.
We are learning to
- design an algorithm with steps and decisions for a new task,
- order the decisions so that every shape gets its most exact name,
- test an algorithm on every card, including the tricky ones.
Success criteria
- I can write steps that name any triangle by its sides, and explain the order I chose.
- I can test my algorithm on every triangle card and fix what fails.
You need
The worksheet, the five triangle cards, rulers, protractors, and large paper for the flowchart.
Lesson flow (about 60 minutes)
| 10 min | Trace on the board Show the board (see the box). Ask: “The trace named it a triangle. What question would you add to say what kind of triangle?” |
| 30 min | Design and test Pairs complete the steps in Part A, test them on the triangle cards, then try Part B. |
| 20 min | Flowchart Part C on large paper; early finishers do Part D. Ask: “Every diamond in a flowchart has two ways out. Where does each one go?” |
Two shorter sessions instead? Split after Part B; start the second with Part C.
Watch for these ideas
- Testing “two sides equal” before “three sides equal”, so the equilateral triangle comes out isosceles.
- Comparing sides by eye. Use the ticks on the cards, or measure.
- A flowchart decision with only one way out. Each needs a yes and a no.
Answers
- Part A: step 2 “all three sides are equal”, step 3 “two sides are equal”; E scalene, B equilateral, I scalene, P isosceles, L isosceles.
- Part B: card B now comes out isosceles: it passes “two sides equal” before it reaches “three sides equal”. The test for the more exact name has to come first.
- Part C: E scalene, right-angled; B equilateral, acute-angled; I scalene, obtuse-angled; P isosceles, right-angled; L isosceles, acute-angled.
- Part D: no: an equilateral triangle’s angles are all 60°, so it is always acute-angled, and the flowchart never needs the other two leaves after “equilateral”. An isosceles obtuse-angled triangle can exist, such as (0, 0), (6, 0), (3, 1).
Designing an algorithm
A. Name a triangle by its sides
Complete the algorithm, then test it on the five triangle cards.
- Compare the lengths of the three sides.
- If ________________________________, write “equilateral” and stop.
- If ________________________________, write “isosceles” and stop.
- Write “scalene” and stop.
| Card | E | B | I | P | L |
| By its sides |
B. Swap two steps
Swap steps 2 and 3. Which card now gets a less exact name? Why does the order matter here?
C. Both names in one flowchart
Draw one flowchart that names a triangle by its sides and then by its largest angle (yesterday’s Part A). Use a diamond for each decision and a box for each answer. Test it on every triangle card.
| Card | Sides | Angles |
|---|---|---|
| E | ||
| B | ||
| I | ||
| P | ||
| L |
D. Stretch
- Could your flowchart ever give “equilateral” and “right-angled” together? Explain, then draw an isosceles triangle that is obtuse-angled on dot paper.
Sorting a set
An algorithm can sort a whole set, one card at a time. Two yes-or-no questions split the sixteen cards into four groups in a Carroll diagram, and a Venn diagram shows two attributes that some cards share.
We are learning to
- run the same questions on every card in a set and record where each one goes,
- show a two-question sort as a Carroll diagram and as a Venn diagram,
- write the sorting algorithm as steps.
Success criteria
- I can place every card in a Carroll diagram and check each one against both questions.
- I can explain where a card that has both attributes, or neither, goes in a Venn diagram.
You need
The worksheet, the shape cards and question cards.
Lesson flow (about 60 minutes)
| 10 min | Bins on the board Show the board (see the box). Ask: “The square went into the squares bin. Could it have gone into the rectangles bin too?” |
| 30 min | Sort the set Pairs lay the two question cards out as a grid and sort all sixteen cards for Part A, then Part B. |
| 20 min | Write the sorter Part C on their own; early finishers do Part D. Ask: “Your steps put every card in exactly one box. How do you know?” |
Two shorter sessions instead? Split after Part A; start the second with Part B.
Watch for these ideas
- Putting a card in two boxes of the Carroll diagram. Each card answers each question once, so it lands in one box.
- Leaving out cards that fit neither circle. They go inside the box, outside both circles.
- Missing parallel sides that are not side by side: the regular hexagon has three pairs, and the L-shape six.
Answers
- Part A: 4 sides with a right angle D, K; 4 sides, no right angle A, F, H, M, O; not 4 sides with a right angle C, E, J, P; not 4 sides, no right angle B, G, I, L, N.
- Part B: both A, D, G; only all sides equal B, N; only parallel sides C, H, J, K, O; neither E, F, I, L, M, P.
- Part C: for example, 1 if it has 4 sides go to step 3; 2 if it has a right angle write box 3, otherwise box 4, and stop; 3 if it has a right angle write box 1, otherwise box 2, and stop.
- Part D: 8 boxes; for these cards (4 sides, a right angle, concave) and (not 4 sides, no right angle, concave) stay empty (such shapes exist, but none is on the cards).
Sorting a set
A. A Carroll diagram
Sort all sixteen cards. Write each card’s letter in the one box that fits both answers.
| Has a right angle | Has no right angle | |
|---|---|---|
| Has 4 sides | box 1 | box 2 |
| Does not have 4 sides | box 3 | box 4 |
B. A Venn diagram
Write each card’s letter in the right region. A card with both attributes goes where the circles overlap.
C. Write the sorter
Write numbered steps that send any card to the right box of the Carroll diagram in Part A.
D. Stretch
- Add a third question: “Is it concave, with a corner that points in?” How many boxes does a sort with three questions need? Which of them stay empty for these sixteen cards?
Improving and describing
Two algorithms can give the same names yet ask different numbers of questions. Students count questions, test and fix algorithms, and describe one clearly enough for someone else. Then the quiz.
We are learning to
- compare two algorithms by how many questions they ask,
- test an algorithm with tricky cards, and describe one so that someone else can follow and check it.
Success criteria
- I can count the questions a tree asks for each card and in total.
- I can write steps that a classmate follows without asking me anything.
You need
The worksheet, the shape cards, and the unit’s self-check quiz on the board.
Lesson flow (about 60 minutes)
| 10 min | Fewer questions Show “The order of questions matters” (it opens on Order A); press “Order B: angles first”. Ask: “Both orders give the same names. Why does Order B ask more questions?” |
| 30 min | Problems Students work through problems 1 to 6; 7 and 8 are the stretch. |
| 20 min | Class quiz game Run the self-check quiz as a class game (see the box), then wrap up. |
Two shorter sessions instead? Split after problem 3; start the second with problem 4.
Watch for these ideas
- Judging an algorithm only by whether it is right: two right ones can do different amounts of work.
- Testing only easy cards. The tricky ones, such as a square for a rectangle question, find the mistakes.
- Steps that need guessing, such as “if it looks like a square”.
Answers with working
- Tree X D 3, K 3, A 2, F 1: 9; tree Y D 2, K 2, A 2, F 2: 8. Tree Y is better.
- An even split shrinks both piles: after tree Y’s first question each pile holds 2 cards and needs one more question; after tree X’s, three cards share a pile and two of them need two more.
- Card A, the rhombus: all its sides are equal but its angles are not. Add “and all its angles are equal”.
- For example: 1 not 4 sides: no, stop; 2 both pairs of opposite sides parallel: yes, otherwise no. D yes, M no, O no.
- Choices vary: a right-angled card, one with no right angle, and a tricky one such as J.
- No: test cards with no right angle too; an algorithm that always says yes would pass.
- No: naming every card after 2 questions makes 8; naming one after a single question leaves three in a pile, and two of them then need 3: 1 + 2 + 3 + 3 = 9.
- 4: each question can at most halve the cards left, 16, 8, 4, 2, 1.
Improving and describing
Problems (7 and 8 are the stretch)
- Both trees name cards D, K, A, F. Count the questions each card needs in each tree, and the totals. Which tree is better?Tree XTree Y
Card D K A F Total Tree X Tree Y - Tree X’s first question sets aside only one card. Tree Y’s splits the cards 2 and 2. Why does that save questions?
- An algorithm says: “If all its sides are equal, write regular; otherwise write not regular.” Which card proves it wrong? How would you fix it? ______________________
- Write steps a classmate could follow, without asking you anything, to decide whether a card is a parallelogram. Test them on cards D, M, O.
- An algorithm is meant to find every card with a right angle. Which three cards would you test it on, and why?
- The algorithm in problem 5 said yes to every card you tested with a right angle. Is that enough to trust it? Explain.
- Stretch. Could any tree for the four cards in problem 1 ask fewer than 8 questions in total? Explain.
- Stretch. What is the fewest yes-or-no questions that can always pick out one card from all sixteen? Explain. ____________
Sixteen shape cards
Days 1 to 5, one set per pair. Cut out the 16 cards. Ticks show equal sides (sides with the same number of ticks are equal) and a small square shows a right angle; on the dot grids, count along the dots to check parallel sides.
Question cards
Days 1, 3 and 4, one set per pair. Cut out the cards. Lay a question card down, put the shape cards that answer yes on one side and no on the other, and keep going until every pile holds one kind of shape. The blank cards are for questions of your own.
What we know: Algorithms for shapes
Work on your own. Algorithm W:
- If it has 3 sides, write “triangle” and stop.
- If all its angles are right angles, write “rectangle” and stop.
- Write “other” and stop.
- Run W on a square. Which steps run, and what does it write? ______________________
- Run W on a regular hexagon. Which steps run, and what does it write? ______________________
- W calls a square a rectangle. Is that wrong? What step would you add so that W names squares?
- Write one yes-or-no question that tells a rhombus from a kite. ______________________________
- In a Carroll diagram with “has 4 sides” and “has a right angle”, where does a regular octagon go? ____________
- A tree asks exactly 3 questions of every shape. What is the most kinds of shape it can tell apart? ________
- These steps are jumbled: (a) If it has 4 sides, write “quadrilateral” and stop. (b) Count the sides. (c) Write “more than 4 sides” and stop. (d) If it has 3 sides, write “triangle” and stop. Which step must come first, and which must come last? ____________
- Draw this as a decision tree: 1. If it is concave, write “concave” and stop. 2. If it has a right angle, write “right angle” and stop. 3. Write “other” and stop.
How did this week feel? Circle one: I can teach it · I am getting there · I need more help
Answers and marking guide
Answers with working
- Steps 1 and 2: it does not have 3 sides, and all its angles are right angles, so W writes “rectangle”.
- Steps 1, 2, 3: 6 sides, and its angles are 120°, so W writes “other”.
- Not wrong, as a square is a rectangle, but not its most exact name. Before step 2, add: if all its angles are right angles and all its sides are equal, write “square” and stop.
- “Are all its sides equal?” (or “Does it have two pairs of parallel sides?”): yes for the rhombus, no for the kite.
- In “does not have 4 sides” and “has no right angle”: its angles are all 135°.
- 8: each question splits every pile in two, 2, 4, 8.
- First (b), as the others need the count; last (c), the catch-all. Steps (a) and (d) may come in either order.
A quick three-level guide
| Idea | Working towards | At standard | Beyond |
|---|---|---|---|
| Tracing (Q1, Q2) | runs every step, even after a stop | records the steps run and the output | spots a step that can never be reached |
| Exact names (Q3, Q4) | treats a true but less exact name as wrong, or the reverse | explains the most exact name, and finds a question that splits two shapes | gives two questions that work and says which is better |
| Sorting and size (Q5, Q6) | places a shape by how it looks | places a shape by its answers, and counts the leaves | explains why each extra question can double the leaves |
| Order and describing (Q7, Q8) | orders steps at random | puts the action first and the catch-all last, and draws steps as a tree | explains which steps may swap, and why |
Eight questions, four ideas. A student at standard traces an algorithm exactly, gives shapes their most exact names, sorts by the answers, and orders and describes steps so others can follow them.
Weekly class record
Jot a tick as you move around the room; the mini-check fills any gaps. A tick a day is plenty.
| Name | Trees | Steps | Design | Sorting | Improving |
|---|---|---|---|---|---|
The five columns are the five days: decision trees, steps, designing, sorting a set, and improving and describing.