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.
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)
A top-tier student project for Scores & Counters includes:
- Core Deliverable: Create a Score Variable
- Target Quality: Creates and names a variable in block code to store a game score or counter.
- Excellence & Polish: Explains how computer memory stores named variables and retrieves them by name.
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
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: AP.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:
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.
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)
A top-tier student project for Modifying Values includes:
- Core Deliverable: Build a Score & Timer System
- Target Quality: Programs automatic variable increments for score tracking and countdown timers.
- Excellence & Polish: Combines multiple variables (score, lives, level) that interact based on game rules.
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
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: AP.01.B.1.1 โ 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:
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.
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)
A top-tier student project for Strings & Booleans includes:
- Core Deliverable: Data Type Sorting Challenge
- Target Quality: Selects appropriate data types for variables (e.g. integer for score, string for player name, Boolean for game_over).
- Excellence & Polish: Explains why adding two text strings ("5"+"5"="55") differs from adding two numbers (5+5=10).
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
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: AP.02.B.1.1 โ 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:
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` + "!"
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)
A top-tier student project for User Responses includes:
- Core Deliverable: Build an Interactive Chatbot
- Target Quality: Uses string joining (join/concatenation) blocks to combine user input with custom text (e.g., "Welcome " + name).
- Excellence & Polish: Validates user input variables before proceeding with program execution.
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
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: AP.02.B.1.1 โ 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:
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.
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)
A top-tier student project for Managing Lists includes:
- Core Deliverable: Build an Inventory System
- Target Quality: Retrieves specific list items using index numbers (e.g. item 1 of inventory).
- Excellence & Polish: Iterates through an entire list using a repeat loop and index counter to process every item.
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
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: AP.03.B.1.1 โ 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:
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.
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)
A top-tier student project for Lists & Dictionaries includes:
- Core Deliverable: Build a Python High-Score Database
- Target Quality: Defines Python dictionaries with key-value pairs `player = {"name": "Alex", "score": 100}`.
- Excellence & Polish: Iterates through nested data structures (list of dictionaries) to search and filter complex datasets.
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
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: AP.03.B.1.1 โ 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:
Teacher override: allow
