Micro:bit - Introduction to variables - Barclays Code Playground
Key Stage: Key Stage 2 Coding Language: Micro:bit Resource type: Lesson plan
In a program, data values can be constant or variable. If data values are variable they can be changed by the program and the user, for example, when the user is asked a question like their age. Variables may change during program execution. In this lesson use variables to track the score in the project using inputs on the micro:bit.
Key resource information
- You will need: Laptops or desktop computers, BBC micro:bits (one per computer), https://microbit.org
Teaching assessment opportunities
- Have the children try out each other’s code – did they all use the same blocks?
- What was different?
- What is the benefit of using variables in your programme, instead of keeping score on paper?
- 45 minutes
- "I understand what a variable is and can use them to programme my micro:bit with various outputs”
- “I understand the operation of a process and its outcome. I can structure related items of information.”
- “I can compare, describe and show number relationships, using appropriate vocabulary and the symbols for equals, not equal to, less than and greater than.”.