← Teacher guide

Writing a geometry rule as an algorithm

An algorithm is a list of steps with decisions. Write the rule for whether three strips can make a triangle as steps, and mark which are computations and which are decisions.

Year 9 Space · Geometric algorithms · about 40 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict and Run 8 min · Investigate 10 min · Modify 10 min · Practise and Make 12 min

Before class

Students need triangles and the Year 7 and 8 classifying algorithms.

The one idea: an algorithm is exact steps, some computing, some deciding. Pseudocode is used here; a flowchart is a drawing of the same steps (a diamond for each decision). Lengths are made up.

Running the lesson

  1. Predict: show of hands before the check.
  2. Make: the working is done on paper first.

The hard part (on purpose)

Writing vague steps like "check the strips". Ask: what exactly does a machine compute, and what does it compare?

When students get stuck

What you will seeA question to askThe fix
A student writes "check the lengths".Which two numbers does the machine compare?Name the numbers and the comparison.

Answers to the checks

  1. 3, 4 and 8: Strips of length 3, 4 and 8 (made up for the task). Can they make a triangle?
    No. The two short strips, 3 + 4 = 7, cannot reach across the 8 strip, so the ends do not meet.
  2. the sum of the short strips: The strips are 5, 7 and 13. What is the sum of the two shorter strips?
    12
    5 + 7 = 12.
  3. Which step decides: Here is the algorithm: 1. Read the three lengths. 2. Find the longest, L. 3. Add the other two, S. 4. If S is greater than L, say "triangle"; otherwise say "no triangle". Which step is a decision?
    Step 4
    Step 4 chooses between two outputs. Steps 2 and 3 compute a value.
  4. Run it: Run the algorithm on 5, 6 and 10. What is S, the sum of the two shorter strips?
    11
    L = 10, so S = 5 + 6 = 11.
  5. Find the mistake: Lena writes her own algorithm. Test it on 8, 2 and 3. Click the step that makes it fail.
    line 2
    Step 2: it only adds a and b. For 8, 2 and 3 that gives 10, which is bigger than 3, so it says triangle, but 2 + 3 = 5 is less than 8. The sum must be the two SHORTER strips, compared with the longest.
  6. An extra decision: You want the machine to also say "equilateral" when all three lengths are equal. Where is the best place for that decision?
    After step 4 says triangle
    Only triangles can be equilateral. First decide it is a triangle, then ask whether all three are equal.
  7. Flowchart shapes: In a flowchart, which shape holds a decision?
    A diamond
    A diamond, with one arrow for yes and one for no.
  8. S minus L: The strips are 4, 4 and 9. What is S minus L? (A negative means it cannot close.)
    -1
    S = 4 + 4 = 8 and L = 9, so 8 − 9 = −1.
  9. S minus L: Strips 6, 9 and 14. By how much does S exceed L? (Negative if it falls short.)
    1
    S = 6 + 9 = 15 and L = 14, so 15 − 14 = 1.
  10. The answer: Strips 6, 9 and 14: what does the algorithm say?
    Triangle
    S > L, so it says triangle.
  11. Review: Review: a shape is enlarged by scale factor 3. How many times bigger is its area?
    9
    3² = 9.
  12. check the machine's strips: The machine is asked for strips of 5, 7 and 13. Follow the algorithm and find how many units too short the two shorter strips are (L − S). (The lengths are made up for the task.)
    Longest: L=13L = 13 (step 2); Sum of the others: S=5+7=12S = 5 + 7 = 12 (step 3); L−S=13−12=1L - S = 13 - 12 = 1 (S is less than L, so no triangle)
    The machine says no triangle: the short strips fall 1 unit short, so the ends would not meet.

Stretch and support

Stretch: Write the same algorithm as a flowchart, then as pseudocode with a loop that tests a list of strip sets.

Support: A printed copy of the situation and a blank table to fill in.

Coach prompt (optional)

For a student who has done the lesson and is still stuck. They paste it into an AI tool your school allows; it asks questions about this lesson's one idea and doesn't give answers. Students see it on the course recap page only through a link ending in ?coach=1: recap with coach prompts.

You are a patient maths coach for a Year 9 student in Australia. Help me understand ONE idea only, from the lesson "Writing a geometry rule as an algorithm".

The idea: Representing a geometric process as an algorithm: I can represent a known geometric construction or theorem application as a step-by-step algorithm using pseudocode or a flowchart.

What understanding looks like:
- Writes a step-by-step algorithm with clear, unambiguous steps
- Correctly identifies at least one decision step (with two branches) and at least one computation step
- Uses pseudocode or flowchart notation consistently

Mistakes students often make here:
- A student writes "check the lengths".

How to coach me (rules from the Waypoints Kit coach):
- Ask me one short question at a time (2 to 4 sentences) and wait for my answer. Never give me the answer before you have heard my thinking, and don't hide the answer inside your question.
- Start in Discover: ask me to explain the idea in my own words, or to predict what happens in a simple example. I can switch any time: "teach it back" (you play a beginner and I explain), "spot the flaw" (you show me an answer with one common mistake and I find it), or "check" (I explain, and you tell me what is solid and what to revisit).
- If I am stuck or say "just tell me", ask what I think first, then give a small hint or a simpler example. Explain only after I have had a real go.
- Stay in this idea: don't teach later ideas or add extra content. If I ask about something else, say it is for another lesson and bring me back.
- After you help, ask me one reflective question, such as how I know my answer is right or what I would check.
- Praise my effort and method, not my ability.
- You can be wrong: if I rely on something you said, remind me to check it against my notes or the lesson. If you don't know, say so.
- Use simple words.
- Stop when I can explain the idea in my own words and get one new example right. Then tell me to go back to the lesson "Writing a geometry rule as an algorithm".

Exit ticket

Is "find the longest" a computation or a decision?

A computation.

What each step is for

Where it leads

Starts AC9M9SP03 node 1.

Where it leads: testing with awkward cases (next).