Skip to content
Computing · Year 6

Active learning ideas

Introduction to Variables: Storing Information

Active learning helps students grasp variables by making abstract concepts tangible. When students physically act out changes to a variable’s value, they see how its state shifts in real time, which builds stronger mental models than abstract discussions alone.

National Curriculum Attainment TargetsKS2: Computing - Programming and Algorithms
25–45 minPairs → Whole Class3 activities

Activity 01

Think-Pair-Share30 min · Small Groups

Variable 'Boxes' Analogy

Provide students with physical boxes labeled with variable names (e.g., 'Score', 'PlayerName'). Have them write different data types (numbers, words, true/false statements) on slips of paper and place them inside the corresponding boxes. Discuss how the contents can be changed.

Explain how a variable acts like a box to hold changing information.

Facilitation TipDuring Role Play: The Human Game Engine, assign one student as the ‘variable manager’ to physically update the value of a variable on a board as others act out the changing state of the system.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 02

Think-Pair-Share45 min · Individual

Coding Challenge: Point Counter

Using a block-based coding platform, students create a simple program where clicking a sprite increases a 'Score' variable by one. They will need to initialize the variable to zero and then update it on each click.

Compare and contrast different types of data a variable can store (numbers, text, true/false).

Facilitation TipFor Collaborative Investigation: Variable Stress Test, assign small groups different variable types to test, then rotate so each student experiences how strings, numbers, and booleans behave under updates.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 03

Think-Pair-Share25 min · Small Groups

Data Type Sorting Game

Present students with various pieces of data (e.g., '10', 'Hello', 'true', '3.14', 'false', 'Goodbye'). In teams, they must sort these into categories representing different variable data types (integer, string, boolean, float).

Design a simple program that uses a variable to count points in a game.

Facilitation TipIn Think-Pair-Share: Designing a Multi-State System, provide a partially completed system diagram so students focus on identifying where and why a variable’s state must change rather than starting from scratch.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Start with concrete examples before abstract code. Use everyday scenarios like a traffic light or game score to show how variables hold different data types and update over time. Avoid rushing to syntax; instead, emphasize that a variable is a container for the current state of something. Research shows that students grasp variables better when they see them as dynamic labels rather than fixed boxes.

By the end of these activities, students will confidently name variables, assign appropriate data types, and explain how a variable’s state represents system conditions. They will also recognize that variables must be explicitly updated and checked in code sequences.


Watch Out for These Misconceptions

  • During Collaborative Investigation: Variable Stress Test, watch for students who only test numeric variables and ignore text or boolean types in their scenarios.

    Give each group a mixed set of scenarios (e.g., player health, door locked status, player name) and require them to label each variable with its data type before testing how it updates.

  • During Role Play: The Human Game Engine, watch for students who assume changing a variable in one part of the system automatically updates it everywhere else.

    Have the ‘variable manager’ physically move to each script location and update the variable there, highlighting that updates must happen explicitly at the right moment.


Methods used in this brief