Fix the failed tests with a smaller change, retest, and say what changed and why. Then extend the algorithm to say whether the triangle has a right, acute or obtuse angle.
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.
WorksheetOpen in PrintDownload Print the student copy; the Teacher edition has the answers.
Students will be able to
I can refine an algorithm from tests.
I can explain what changed and why.
I can extend an algorithm with a new decision.
Timing
Predict and Run 8 min · Investigate 10 min · Modify 10 min · Practise and Make 12 min
Before class
Students need the last two lessons and Pythagoras (Year 8).
The one idea: fix with a small change, retest everything, and explain. The right/acute/obtuse test is the converse of Pythagoras and its extension. Lengths are made up.
Running the lesson
Predict: show of hands before the check.
Make: the working is done on paper first.
The hard part (on purpose)
Changing everything at once. Ask: what is the smallest change that fixes the failed case?
When students get stuck
What you will see
A question to ask
The fix
A student rewrites the algorithm.
Which single comparison caused the fault?
Change one thing and retest.
Answers to the checks
the smallest fix: The check "S >= L" lets 3, 4, 7 through. Which small change fixes that case? Change >= to >. Now S must be strictly greater than L, so S = L (a flat line) is rejected. A second change, rejecting zero or negative lengths, handles the other fault.
retest: With the new check "S > L" and "all lengths greater than 0", what does the machine say for 3, 4 and 7? No triangle S is not greater than L, so it says no triangle: the old failure now passes.
Acute: Right, acute or obtuse? For 4, 5 and 6, L² is 36 and the squares of the others sum to 16 + 25 = 41. What is L² minus that sum? -5 36 − 41 = −5: L² is less than the sum, so the largest angle is acute.
Obtuse: For 2, 3 and 4: L² is 16 and the squares of the others sum to 4 + 9 = 13. What is L² minus that sum? 3 16 − 13 = 3: L² is greater, so the largest angle is obtuse.
Find the mistake: Mia adds the right-angle test. Click the step that is wrong. line 2 Step 2: she squares the shortest side as L. It is the LONGEST side that sits opposite the largest angle, so use L².
Right triangle: For 5, 12 and 13: L² is 169 and the others' squares sum to 25 + 144 = 169. What is the difference? 0 169 − 169 = 0: a right triangle.
Explain the change: Which sentence best explains the refinement? I changed >= to > as S = L lies flat; 3, 4, 7 now says no A good explanation names the change (>= to >), the fault it fixes (S = L gives a flat shape), and the retest (3, 4, 7 now says no triangle).
After the fix: After the refinement, 3, 4, 7 gives "no triangle" and 3, 4, 5 gives "triangle". What should you do next? Retest the other old cases Rerun the whole test set to check nothing else broke: a refinement can fix one case and break another.
L squared difference: Strips 6, 8 and 11. L² is 121 and the others' squares sum to 36 + 64 = 100. What is L² minus that sum? 21 121 − 100 = 21.
Which kind: So 6, 8 and 11 make which kind of triangle? Obtuse L² is bigger than the others' squares added: obtuse.
Review: Review: which test case is a boundary for "S > L"? 3, 4, 7 3, 4, 7 has S equal to L.
the machine's final check: Run the refined algorithm on 6, 8 and 11. First check it is a triangle, then compare L² with the sum of the other two squares. What is L² minus that sum? (The lengths are made up for the task.) S=6+8=14>11 (triangle); L2=121, 62+82=100 (squares); 121−100=21 so obtuse (positive means obtuse) 21. A positive difference means the largest angle is obtuse. The algorithm has two checks, the triangle check and the angle type, each tested on cases.
Stretch and support
Stretch: Write the algorithm in pseudocode with a loop that tests a list of strip sets and prints a verdict for each.
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 "Refine it and explain the change".
The idea: Refining and evaluating the algorithm: I can refine an algorithm based on test results and evaluate the refinement, explaining what changed and why it improves the algorithm.
What understanding looks like:
- Makes a specific, justified refinement to the algorithm based on a test failure
- Retests with the previously failing case and confirms the refinement resolves it
- Evaluates the refined algorithm: states what it now handles correctly and any remaining limitations
Mistakes students often make here:
- A student rewrites the algorithm.
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.
- If I seem to be missing the idea that comes before this one (Testing an algorithm with cases), check it quickly, then come back.
- 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 "Refine it and explain the change".
Exit ticket
After a fix, what do you do before saying it works?
Retest the old cases.
What each step is for
the smallest fix: Choosing the minimal change shows whether students change the comparison (> not >=) rather than rebuild everything.
retest: After a change, rerun the failed cases: a fix is only done when the old failures now pass.
explain and extend: A refinement is explained by what changed, why, and what the retest shows; extending an algorithm adds a new decision using a new geometric idea.
apply the refined version: Running the whole refined algorithm on new strips, and explaining a change.
classify by sides: Using the L² comparison on new strips, and a review of testing.
the machine's final check: Returning to the machine: run the finished algorithm and report the result, on paper.