Using variables in programming to develop a game
Downloads can take a few minutes, especially for larger files or slower connections.
Threads
Why this why now
Having already built understanding of sequence, repetition and selection, pupils are now ready to explore how programs can store and change data. Introducing variables at this stage helps them see how values like scores, timers or measurements can be represented within code. This mirrors the way algebra in maths uses symbols to stand for changing quantities and how science uses variables to measure and control experiments. Learning about variables shows pupils the power of abstraction, helping them connect computing with problem-solving across subjects.
Prior knowledge requirements
- Pupils can create block-based programs that use sequence, selection and iteration.
- Pupils have experience of designing simple algorithms, implementing them as code and then testing them for completeness.
- Pupils recognise that programs are coded algorithms.
Threads
Why this why now
Having already built understanding of sequence, repetition and selection, pupils are now ready to explore how programs can store and change data. Introducing variables at this stage helps them see how values like scores, timers or measurements can be represented within code. This mirrors the way algebra in maths uses symbols to stand for changing quantities and how science uses variables to measure and control experiments. Learning about variables shows pupils the power of abstraction, helping them connect computing with problem-solving across subjects.
Prior knowledge requirements
- Pupils can create block-based programs that use sequence, selection and iteration.
- Pupils have experience of designing simple algorithms, implementing them as code and then testing them for completeness.
- Pupils recognise that programs are coded algorithms.
Using variables in programming to develop a game
This unit explores the concept of variables in programming through the development of games. Pupils will investigate what variables are and relate them to real-world examples of values that can be set and changed. Then they use variables to create a simulation of a scoreboard.
6 lessons in unit
slide decks, worksheet PDFs, quizzes and lesson overviews. You can select individual lessons from the Using variables in programming to develop a game unit and download the resources you need, or download the entire unit now. See every unit listed in our primary computing curriculum and discover more of our teaching resources for primary computing programmes.
