Sensing inputs
I can update a variable based on the state of an input.
Sensing inputs
I can update a variable based on the state of an input.
These resources will be removed by end of Summer Term 2025.
Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.
These resources were created for remote use during the pandemic and are not designed for classroom teaching.
Lesson details
Key learning points
- A variable's value can be changed according to a condition.
- Physical inputs can be tested as part of conditions in if...then...else statements.
- Checking the value of a variable doesn't change the variable's value.
Keywords
Input - data that is sent to a program to be processed
Sensor - an input device that allows a computer to collect data from the physical environment
Variable - a named piece of data stored in a computer’s memory which can be accessed and changed by a computer program
Common misconception
Checking a variable changes its value.
Reading a variable's value doesn't change it, only assigning it does.
To help you plan your year 6 computing lesson on: Sensing inputs, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your year 6 computing lesson on: Sensing inputs, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 2 computing lessons from the Sensing movement with physical computing unit, dive into the full primary computing curriculum, or learn more about lesson planning.
Equipment
Pupils will need access to a device with block-based programming software that can be used to program a physcial controller. Examples in this lesson use Microsoft MakeCode https://oak.link/makecode
Licence
Prior knowledge starter quiz
5 Questions
Q1.What does a computer do when a condition in a program is met?
Q2.What is a condition in computing?
Q3.Which keyword describes the part of a program where a choice is made?
Q4.Place these steps in the correct order for how a program checks a condition and acts:
Q5.Match the example to the correct keyword:
“if it’s raining, take an umbrella”
“the door is open: True or False?”
“first, then next, then last”
“choose what to do based on the weather”
Assessment exit quiz
6 Questions
Q1.What is the term for data sent into a program?
Q2.What does a sensor do in a computer system?
Q3.What do we call a named piece of data that a program can change as it runs?
Q4.Which statement about variables is correct?
Q5.Match each keyword to its description:
a device that collects data from the environment
data sent to a program
a named piece of data that can change
a rule checked by a program