Topics / Variables

Variables

Names, assignment, and how values persist from one statement to the next.

Generated code is full of names. If students cannot say what a name currently holds, they cannot judge whether a suggestion is safe to accept.

Identify Terminology L1 Knowledge Atoms ~1 min

What is the = symbol called?

In the line below, which term correctly describes the = symbol?

Start activity
Define a Concept L1 Knowledge Atoms ~2 min

Define a variable

In your own words, what is a variable in programming?

Start activity
Match Terms to Definitions L1 Knowledge Atoms ~2 min

Match the variable vocabulary

Match each term to the definition that fits it. The code is there so you can see what each term refers to; …

Start activity
Explain Code L2 Comprehension Blocks ~3 min

What does this checkout fragment do?

Explain in plain English what this code does. Name the values, not only the syntax.

Start activity
Complete the Code L3 Application Atoms ~2 min

Complete the bill total

The program should print the total the customer pays: the subtotal plus delivery. Which expression completes the blank?

Start activity
Analyse a Misconception L4 Analysis Relations ~3 min

Why did the student predict 10?

A student predicts this program prints 10 and explains: 'b is connected to a, so when a changes, b changes too.' Which …

Start activity
Extend the Code L5 Synthesis Macro Structure ~5 min

Add a discount without a magic number

This program prices an order. Extend it so it also applies a 10% discount and prints the discounted total. Use a named …

Start activity
AI Suggestion Evaluation L6 Evaluation Relations ~4 min

Does this line swap the two values?

The student wants to swap the values of left and right. An AI suggested the line below. Accept or reject it, and …

Start activity