States and rules (traffic lights) – Year 9 Computing lesson
Pupils learn to describe a state transition diagram for a real system as a typed state table, with the rule that triggers each transition.
Lesson 2 of 6 in unit 9.5 Modelling the Real World, taught in Year 9, Summer 1. It answers one big question: How can states and rules describe how a system behaves?
By the end, pupils can describe a state transition diagram for a real system as a typed state table, with the rule that triggers each transition.
- The Build (the main task)
- Type a state transition table for the pedestrian crossing outside school, with four states, and give the rule that triggers every transition. Name the start state.
- Support version
- Part-filled diagram: the four state circles and arrows are drawn and two rules are written in; pupils add the other rules from a word bank.
- Challenge
- Add a state for when the crossing is switched off at night, and the rules to enter and leave it.
- Real-world link
- The pelican crossing outside school is a system with states; the canteen's 'open' and 'closed' tills work the same way.
- Key words
- State, Transition and Rule, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “A transition is a state, so the arrows can be labelled with states”; “A system can be in two states at the same time”.
- National Curriculum
- NC1 (design, use and evaluate abstractions that model real-world problems and physical systems); NC3 (two or more languages, at least one textual; data structures; modular programs with procedures or functions).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Pupils can do it all on paper.
Also sold in the Modelling the Real World unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for KS3 Computing
See allPupils learn to use abstraction to decide which details a model needs, and state the assumptions it makes.
Free sample lessonPupils learn to write a Python simulation that uses random numbers in a function and a loop to predict the length of a queue.
Pupils learn to explain how a machine learning model is trained on example data, test its predictions and spot bias in its training data.
Written for the specifications named. Not endorsed by or affiliated with any exam board.