We are learning to
- We are learning to represent a nested decision in pseudocode and a flowchart.
Success criteria: I can…
- I can place one IF inside another.
- I can trace three inputs to the correct alert.
Lesson sequence
40 min total- 1
Define the design need
Starter 0–8 minTeacherPresent the fictional rule: if soil moisture is below 30, check temperature; if temperature is above 35, output “Water later with adult check”, otherwise output “Water now”; if moisture is 30 or above, output “No watering alert”. State that these are classroom test values, not horticultural advice.
StudentsIdentify the outer question and the inner question.
Rule card - 2
Write pseudocode
Main 8–20 minTeacherModel: IF moisture < 30 THEN; IF temperature > 35 THEN alert = “Water later with adult check”; ELSE alert = “Water now”; ENDIF; ELSE alert = “No watering alert”; ENDIF. Indent the inner IF.
StudentsCopy and annotate the two branches.
Pseudocode card - 3
Trace and draw
Main 20–32 minTeacherGive tests (20, 38), (20, 25), (40, 38) with moisture then °C. Model outputs respectively “Water later with adult check”, “Water now”, “No watering alert”. Build a flowchart with two diamonds and three terminal outputs.
StudentsTrace each pair and connect the correct boxes; check 30 and 35 boundary values.
Flowchart template Test cards - 4
Explain boundaries
Plenary 32–40 minTeacher- Ask: moisture exactly 30 follows which branch? Temperature exactly 35 when moisture is 20? Record “No watering alert” and “Water now”. Discuss why boundary testing matters.
StudentsExplain one boundary and suggest a test case for it.
Exit card
Key vocabulary
Differentiation
Support
- Supply pre-arranged flowchart boxes and colour the outer and inner branches.
Extension
- Propose a new test at a threshold and justify its output without adding another condition.
Accessibility
- Offer a large-print model, spoken directions and a seated participation option.
Assessment
- Collect traced outputs for five inputs and the two-diamond flowchart.
Resources
- Rule card
- Pseudocode card
- Flowchart template
- Test cards
- Exit card
Safety notes
- This is a paper simulation. Do not connect mains electricity or water to electronic equipment; real irrigation decisions require adult supervision.