Learning objective
Variables & Data
Variables & Data Structures
Understanding how computers store, modify, and track changing information using named variables, data types, lists, and complex data structures across programming projects.
Scores & Counters
Understand that computers use named containers to remember and update changing values, such as game scores or counters.
Let's Go!
Learn
A variable is like a labelled box in computer memory. You give the box a name (like "score" or "lives") and put a value inside. Whenever something happens in your game, the computer opens the box, reads the number, or puts a new number inside. In computing, digital games and programs rely on memory containers to keep track of changing information. As you explore the interactive Block Coding Simulator below, focus on how to create and names a variable in block code to store a game score or counter.
Select blocks from the palette on the left to build your program stack.
Assemble blocks in the Studio to inspect the syntax tree.
| Step | Block Instruction | Sprite (X, Y) | Variables | Status |
|---|---|---|---|---|
| No script execution traces yet. Click ๐ฉ Go to record runtime data. | ||||
Apply Simulator Skills โข Try it yourself
Create a Score Variable
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Can identify a box or container holding a value like a score token.
Explains that a variable holds a specific piece of information that can change.
Creates and names a variable in block code to store a game score or counter.
Explains how computer memory stores named variables and retrieves them by name.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: See-Think-Wonder
Teacher notes: Facilitate the See-Think-Wonder routine for 2โ3 minutes. Encourage students to connect the prompt to Form (Digital games and programs rely on memory containers to keep track of changing information.).
Achievement pathway
- Foundation: Can identify a box or container holding a value like a score token.
- Developing: Explains that a variable holds a specific piece of information that can change.
- Secure: Creates and names a variable in block code to store a game score or counter.
- Mastering: Explains how computer memory stores named variables and retrieves them by name.
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.01.B.1.1 โ Understand that computers use named containers to remember and update changing values, such as game scores or counters.
PYP: Form ยท Digital games and programs rely on memory containers to keep track of changing information.
Learner profile: Inquirer
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "What is a variable in programming?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 2: Modifying Values
Complete the previous learning check to unlock this next level.
Modifying Values
Program variable updates using mathematical operations (+1, -1) to track dynamic game scores and timer countdowns.
Learning objective
Students will program scripts to increase, decrease, and modify variable values dynamically in response to game events.
Let's Go!
Learn
To update a variable, we use math blocks. "Change score by 1" adds 1 to whatever is currently in the box. "Change lives by -1" subtracts 1. We can also set a timer variable to decrease every 1 second inside a repeat loop. In computing, interactive programs update stored values in response to user actions and game events. As you explore the interactive Python Console Simulator below, focus on how to program automatic variable increments for score tracking and countdown timers.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Build a Score & Timer System
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Can manually change the value inside a variable block.
Uses a "change variable by 1" block when a sprite is clicked.
Programs automatic variable increments for score tracking and countdown timers.
Combines multiple variables (score, lives, level) that interact based on game rules.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Teacher notes: Facilitate the Think-Pair-Share routine for 2โ3 minutes. Encourage students to connect the prompt to Function (Interactive programs update stored values in response to user actions and game events.).
Achievement pathway
- Foundation: Can manually change the value inside a variable block.
- Developing: Uses a "change variable by 1" block when a sprite is clicked.
- Secure: Programs automatic variable increments for score tracking and countdown timers.
- Mastering: Combines multiple variables (score, lives, level) that interact based on game rules.
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.02.B.1.2 โ Program variable updates using mathematical operations (+1, -1) to track dynamic game scores and timer countdowns.
PYP: Function ยท Interactive programs update stored values in response to user actions and game events.
Learner profile: Communicator
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "If score = 5, what is score after running "change score by 3"?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 3: Strings & Booleans
Complete the previous learning check to unlock this next level.
Strings & Booleans
Distinguish between different data types (integers, floats, text strings, and true/false Booleans) and apply them in block code.
Learning objective
Students will identify and convert between core computer data types: integers, decimals (floats), text strings, and Boolean true/false values.
Let's Go!
Learn
Computers store different kinds of data: Integers are whole numbers (0, 5, -12). Floats are decimal numbers (3.5, 99.9). Strings are text inside quotes ("Alex", "Winner!"). Booleans are simple logical flags that are either True or False. In computing, computers categorize information into specific data types to process numbers, text, and logical decisions correctly. As you explore the interactive Spreadsheet Simulator below, focus on how to select appropriate data types for variables (e.g. integer for score, string for player name, Boolean for game_over).
| A | B | C | |
|---|---|---|---|
| 1 | Item | Amount | |
| 2 | Apples | 5 | |
| 3 | Bananas | 3 | |
| 4 | Carrots | 2 | |
| 5 | Total |
Apply Simulator Skills โข Try it yourself
Data Type Sorting Challenge
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Recognizes the difference between a number (10) and text ("Hello").
Identifies true/false values as Booleans used in conditional blocks.
Selects appropriate data types for variables (e.g. integer for score, string for player name, Boolean for game_over).
Explains why adding two text strings ("5"+"5"="55") differs from adding two numbers (5+5=10).
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Sort & Classify
Teacher notes: Facilitate the Sort & Classify routine for 2โ3 minutes. Encourage students to connect the prompt to Change (Computers categorize information into specific data types to process numbers, text, and logical decisions correctly.).
Achievement pathway
- Foundation: Recognizes the difference between a number (10) and text ("Hello").
- Developing: Identifies true/false values as Booleans used in conditional blocks.
- Secure: Selects appropriate data types for variables (e.g. integer for score, string for player name, Boolean for game_over).
- Mastering: Explains why adding two text strings ("5"+"5"="55") differs from adding two numbers (5+5=10).
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.03.B.1.3 โ Distinguish between different data types (integers, floats, text strings, and true/false Booleans) and apply them in block code.
PYP: Change ยท Computers categorize information into specific data types to process numbers, text, and logical decisions correctly.
Learner profile: Thinker
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "Which data type represents a True or False value?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 4: User Responses
Complete the previous learning check to unlock this next level.
User Responses
Store user responses from interactive prompts into variables and join text strings dynamically to personalize program outputs.
Learning objective
Students will capture user responses using input prompts, store inputs in variables, and join strings to generate personalized messages.
Let's Go!
Learn
When you use an "ask [What is your name?] and wait" block, the computer stores the user's answer in a temporary variable called `answer`. We immediately copy `answer` into a custom variable like `player_name`, then use "join" blocks to build personalized phrases like "Hello " + `player_name` + "!"
Select blocks from the palette on the left to build your program stack.
Assemble blocks in the Studio to inspect the syntax tree.
| Step | Block Instruction | Sprite (X, Y) | Variables | Status |
|---|---|---|---|---|
| No script execution traces yet. Click ๐ฉ Go to record runtime data. | ||||
Apply Simulator Skills โข Try it yourself
Build an Interactive Chatbot
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Uses an ask block to get user input.
Stores the answer reporter block into a named variable.
Uses string joining (join/concatenation) blocks to combine user input with custom text (e.g., "Welcome " + name).
Validates user input variables before proceeding with program execution.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: See-Think-Wonder
Teacher notes: Facilitate the See-Think-Wonder routine for 2โ3 minutes. Encourage students to connect the prompt to Connection (Interactive systems capture user input to create customized, adaptive digital experiences.).
Achievement pathway
- Foundation: Uses an ask block to get user input.
- Developing: Stores the answer reporter block into a named variable.
- Secure: Uses string joining (join/concatenation) blocks to combine user input with custom text (e.g., "Welcome " + name).
- Mastering: Validates user input variables before proceeding with program execution.
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.04.B.1.4 โ Store user responses from interactive prompts into variables and join text strings dynamically to personalize program outputs.
PYP: Connection ยท Interactive systems capture user input to create customized, adaptive digital experiences.
Learner profile: Principled
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "What block operation combines two text strings together?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 5: Managing Lists
Complete the previous learning check to unlock this next level.
Managing Lists
Create, populate, and manipulate ordered lists (arrays) to store multiple items, access elements by index, and iterate through collections.
Learning objective
Students will create and manipulate ordered list variables (arrays) by adding, deleting, inserting, and accessing items by numerical index.
Let's Go!
Learn
A list (or array) is a single container that holds multiple items in order. Each item has an index number starting at 1 (or 0 in text code). You can add items to the end, insert items at a specific index, delete items, or search if a list contains a specific value.
| Sensor Input | Bus Type | Raw Digital | Converted Unit |
|---|---|---|---|
| โ๏ธ Photocell (Light) | Internal Matrix | 128 | 50% Lux |
| ๐ก๏ธ Thermistor (Temp) | I2C Subsystem | 490 | 24ยฐC |
| ๐ณ Accelerometer (X,Y,Z) | LSM303AGR I2C | (0, 0, 1024) | 1.0g Flat |
| ๐ GPIO Pin 0 | Edge Connector | 0 | 0.0V (Low) |
Apply Simulator Skills โข Try it yourself
Build an Inventory System
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Creates a list variable and adds items manually.
Uses code blocks to append and delete items from a list.
Retrieves specific list items using index numbers (e.g. item 1 of inventory).
Iterates through an entire list using a repeat loop and index counter to process every item.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Connect-Extend-Challenge
Teacher notes: Facilitate the Connect-Extend-Challenge routine for 2โ3 minutes. Encourage students to connect the prompt to Perspective (Organizing multiple pieces of related data into ordered lists enables efficient automated searching and processing.).
Achievement pathway
- Foundation: Creates a list variable and adds items manually.
- Developing: Uses code blocks to append and delete items from a list.
- Secure: Retrieves specific list items using index numbers (e.g. item 1 of inventory).
- Mastering: Iterates through an entire list using a repeat loop and index counter to process every item.
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.05.B.1.5 โ Create, populate, and manipulate ordered lists (arrays) to store multiple items, access elements by index, and iterate through collections.
PYP: Perspective ยท Organizing multiple pieces of related data into ordered lists enables efficient automated searching and processing.
Learner profile: Knowledgeable
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "In a list ["Apple", "Banana", "Cherry"], what item is at index 2?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 6: Lists & Dictionaries
Complete the previous learning check to unlock this next level.
Lists & Dictionaries
Design complex data structures (key-value dictionaries, 2D arrays) and implement list operations (sorting, searching, appending) in text code.
Learning objective
Students will write text code (Python) to define lists and key-value dictionaries, access nested data structures, and implement linear searching operations.
Let's Go!
Learn
In text languages like Python, we use lists `[val1, val2]` for ordered sequences and dictionaries `{"key": "value"}` for named attributes. A dictionary allows you to look up values by name (e.g., `user["email"]`) rather than an index number. In computing, structuring complex data into key-value pairs and 2D matrices allows software systems to model real-world data effectively. As you explore the interactive Social Privacy Simulator below, focus on how to define Python dictionaries with key-value pairs `player = {"name": "Alex", "score": 100}`.
Apply Simulator Skills โข Try it yourself
Build a Python High-Score Database
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Declares a Python list using square brackets `items = ["a", "b"]`.
Uses list methods like `.append()`, `.remove()`, and `len()`.
Defines Python dictionaries with key-value pairs `player = {"name": "Alex", "score": 100}`.
Iterates through nested data structures (list of dictionaries) to search and filter complex datasets.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Teacher notes: Facilitate the Think-Pair-Share routine for 2โ3 minutes. Encourage students to connect the prompt to Reflection (Structuring complex data into key-value pairs and 2D matrices allows software systems to model real-world data effectively.).
Achievement pathway
- Foundation: Declares a Python list using square brackets `items = ["a", "b"]`.
- Developing: Uses list methods like `.append()`, `.remove()`, and `len()`.
- Secure: Defines Python dictionaries with key-value pairs `player = {"name": "Alex", "score": 100}`.
- Mastering: Iterates through nested data structures (list of dictionaries) to search and filter complex datasets.
Curriculum links
Curriculum strand: Algorithms and Programming
Outcome: VARD.06.B.1.6 โ Design complex data structures (key-value dictionaries, 2D arrays) and implement list operations (sorting, searching, appending) in text code.
PYP: Reflection ยท Structuring complex data into key-value pairs and 2D matrices allows software systems to model real-world data effectively.
Learner profile: Reflective
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "In Python, which syntax defines a dictionary key-value pair?" with a teacher or teaching assistant.
Teacher override: allow





Classify 6 items into 'Private PII' (secret) versus 'Safe to Share' (hobbies/favorites) to protect identity.
Learning code, creating digital art & gaming! ๐
Classify each piece of information. Protect sensitive Personally Identifiable Information (PII):
This draft photo leaks 3 pieces of private data! Click each sensitive area to censor it before publishing:
Analyze the statement and choose the true reality of digital content persistence:
Choose an illustrated avatar and assemble a private handle without real names:
Identify which usernames leak personal details and which is 100% safe:
Audit your public profile bio. Remove sensitive security-question answers:
"Hi! I'm in Year 5 at Oakridge Primary. My dog Buster is my best friend! Born in July 2015 ๐ถ"
An educational quiz app asks for registration. Mark which fields should be filled vs left blank:
A viral quiz promises to calculate "Your Secret Pirate Name":
Only approve the post that is 100% safe to display on a public billboard:
"We are flying to Spain for two weeks tomorrow morning! Our house will be empty!"
"Our science team finished our solar oven project! Here is our temperature chart."
Evaluate 3 app permission requests. Grant only what is functionally essential:
Harden these 3 tablet settings to restrict background data collection:
When a website displays a Cookie Banner, what is the safest configuration?
You receive an urgent direct message from an account with your friend Liam's photo:
Audit connected apps on your social account. Revoke access from sketchy third parties:
Enable all 3 master security gates to achieve 100% Armor Rating:
Match each legal clause to its real-world plain English meaning:
What does COPPA / GDPR require from apps targeting children under 13?
Select 3 high-quality learning artifacts to publish in your academic portfolio:
Understand the two ways information is stored about you online: