Variables & Data

Variables & Data Structures

1
2
3
4
5
6

Understanding how computers store, modify, and track changing information using named variables, data types, lists, and complex data structures across programming projects.

Level 1

Scores & Counters

Understand that computers use named containers to remember and update changing values, such as game scores or counters.

Learning objective

Students will understand that a variable is a named storage box in computer memory that holds values that can change during program execution.

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.

Content

Unsupported content component

Interactive Diagram

Try it yourself

Create a Score Variable

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

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 (Goal)

Creates and names a variable in block code to store a game score or counter.

Mastery

Explains how computer memory stores named variables and retrieves them by name.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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.
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Self-Reflection Prompt

Learning check

Learning Check

What is a variable in programming?

Select the best answer:

Answer correctly to unlock the next level.

Great job! A variable is a named memory container for dynamic data.Remember: variables are named containers used to hold changing values in computer memory.
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

  • Variables
  • Memory
  • Score Counter
  • Unplugged

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 2: Modifying Values

Complete the previous learning check to unlock this next level.

Level 2

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.

Content

Unsupported content component

Code Breakdown

Try it yourself

Build a Score & Timer System

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Can manually change the value inside a variable block.

Developing

Uses a "change variable by 1" block when a sprite is clicked.

Secure (Goal)

Programs automatic variable increments for score tracking and countdown timers.

Mastery

Combines multiple variables (score, lives, level) that interact based on game rules.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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.
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Peer Feedback

Learning check

Learning Check

If score = 5, what is score after running "change score by 3"?

Select the best answer:

Answer correctly to unlock the next level.

Correct! 5 + 3 = 8.Changing a variable by 3 adds 3 to its existing value of 5.
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

  • Variable Increment
  • Timers
  • Math Operations
  • Block Coding

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 3: Strings & Booleans

Complete the previous learning check to unlock this next level.

Level 3

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.

Content

Unsupported content component

Interactive Matrix

Try it yourself

Data Type Sorting Challenge

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Recognizes the difference between a number (10) and text ("Hello").

Developing

Identifies true/false values as Booleans used in conditional blocks.

Secure (Goal)

Selects appropriate data types for variables (e.g. integer for score, string for player name, Boolean for game_over).

Mastery

Explains why adding two text strings ("5"+"5"="55") differs from adding two numbers (5+5=10).

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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).
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Journal Prompt

Learning check

Learning Check

Which data type represents a True or False value?

Select the best answer:

Answer correctly to unlock the next level.

Spot on! Booleans store True or False values.Booleans are logical flags that can only be True or False.
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

  • Integers
  • Floats
  • Strings
  • Booleans
  • Data Types

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 4: User Responses

Complete the previous learning check to unlock this next level.

Level 4

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` + "!"

Content

Unsupported content component

Step-by-Step Walkthrough

Try it yourself

Build an Interactive Chatbot

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Uses an ask block to get user input.

Developing

Stores the answer reporter block into a named variable.

Secure (Goal)

Uses string joining (join/concatenation) blocks to combine user input with custom text (e.g., "Welcome " + name).

Mastery

Validates user input variables before proceeding with program execution.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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.
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Group Discussion

Learning check

Learning Check

What block operation combines two text strings together?

Select the best answer:

Answer correctly to unlock the next level.

Correct! Joining (concatenation) connects text strings together.String joining / concatenation connects multiple text strings into one sentence.
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

  • User Input
  • String Joining
  • Concatenation
  • Personalized Output

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 5: Managing Lists

Complete the previous learning check to unlock this next level.

Level 5

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.

Content

Unsupported content component

Interactive List Visualizer

Try it yourself

Build an Inventory System

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Creates a list variable and adds items manually.

Developing

Uses code blocks to append and delete items from a list.

Secure (Goal)

Retrieves specific list items using index numbers (e.g. item 1 of inventory).

Mastery

Iterates through an entire list using a repeat loop and index counter to process every item.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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.
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Self-Reflection Prompt

Learning check

Learning Check

In a list ["Apple", "Banana", "Cherry"], what item is at index 2?

Select the best answer:

Answer correctly to unlock the next level.

Awesome! Item 2 is "Banana".Counting from index 1: 1=Apple, 2=Banana, 3=Cherry.
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

  • Lists
  • Arrays
  • Indexing
  • Inventory
  • Data Processing

Gate support

Accessibility alternative:

Teacher override: allow

Back to top

Locked level

Level 6: Lists & Dictionaries

Complete the previous learning check to unlock this next level.

Level 6

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.

Content

Unsupported content component

Python Code Sandbox

Try it yourself

Build a Python High-Score Database

๐ŸŒŸ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)โ–พ

๐ŸŽฏ Task Success Criteria (Rubric)

Foundation

Declares a Python list using square brackets `items = ["a", "b"]`.

Developing

Uses list methods like `.append()`, `.remove()`, and `len()`.

Secure (Goal)

Defines Python dictionaries with key-value pairs `player = {"name": "Alex", "score": 100}`.

Mastery

Iterates through nested data structures (list of dictionaries) to search and filter complex datasets.

๐Ÿ‘€ What A Good One Looks Like (WAGOLL)

Exemplar Standard

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.
๐Ÿ“
Save to Your Website Portfolio:

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!

โญSelf-Assessment: How confident do you feel with this skill?

Reflect

Plenary

Unsupported plenary component

Peer Feedback

Learning check

Learning Check

In Python, which syntax defines a dictionary key-value pair?

Select the best answer:

Answer correctly to complete this strand.

Perfect! Dictionaries use curly braces `{}` with `key: value` pairs.Dictionaries are defined using curly braces with key: value pairs like `{"name": "Alex"}`.
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

  • Python Lists
  • Dictionaries
  • 2D Arrays
  • Data Structures
  • Searching

Gate support

Accessibility alternative:

Teacher override: allow

๐ŸŽ’ Students Home โ†’

Install App for Classroom

One-click fullscreen learning for Chromebooks, iPads & PCs

๐Ÿ–ฅ๏ธ
Distraction-FreeFullscreen window without browser tabs or search clutter.
โšก
1-Tap LaunchPin directly to the Chromebook shelf, iPad dock, or Windows taskbar.
๐Ÿ“ถ
Classroom SpeedInstant cached loads for lessons and simulators even on school Wi-Fi.
๐Ÿ”’
Safe & Ad-Free100% free, private, and no app store logins or passwords needed.
  1. 1
    Click the Install button

    In your browser, look at the right end of the top web address bar for the ๐Ÿ’ป Install or โค“ icon.

  2. 2
    Confirm "Install"

    A popup will ask if you want to install "Ed Tech Hub". Click Install.

  3. 3
    Pin to your Shelf

    Right-click (or two-finger tap) the app icon in your Chromebook bottom shelf and select "Pin"!