Topics / Lists

Lists

Ordered collections, indexing, and aggregation over items.

List processing is a common AI default. Students should be able to say whether a fragment is searching, counting, filtering, or reducing — and whether the empty list is handled.

Identify Terminology L1 Knowledge Atoms ~1 min

What is the number in square brackets?

In colours[1], what is the number 1, which picks out a single item by its position, called?

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

Match the list 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
Program Purpose L2 Comprehension Macro Structure ~3 min

What problem is this list fragment solving?

What overall problem is this program solving? Avoid describing only the syntax.

Start activity
Modify the Code L3 Application Blocks ~3 min

Print only the long names

The program should print only the names with more than 3 letters. Modify it. You may write the new code or describe …

Start activity
Analyse a Misconception L4 Analysis Relations ~3 min

Why did the student predict [1, 2, 3]?

A student predicts this program prints [1, 2, 3] and says: 'I only added 4 to b, so a is untouched.' Which …

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

Collect the passing marks

This program counts passing marks (50 or more). Extend it so it also builds a new list called passed that contains the …

Start activity
Review Code Quality L6 Evaluation Macro Structure ~4 min

Review the negative-number check

An AI generated this function to report whether a list contains any negative number. It passes every test you try. Which review …

Start activity