NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

Chapter 11: Lists (Ordered Data Collections)

📌 What you will learn

Manage quiz banks, inventories, high scores, and tile maps cleanly using numbered Scratch lists.

Lesson goal & core concept

Add, delete, replace, search, and loop through every item in a list.

Scratch lists are 1-indexed (item 1 is the first item). Combining a list with an index variable (i) lets 6 blocks process 100 items.

INTERACTIVE LAB

Variable & List Visualizer (1-Indexed Scratch Lists)

Click the Scratch data operations below to watch variables update and see how Scratch 1-indexed list items shift when you add, insert, or delete.

Variable: score 0
Ready: click any variable or list button
List: inventory length: 3

    Step-by-step practice

    Work through these steps in the Scratch editor, predicting each result before clicking the green flag.

    • Create a list and populate 5 items on green flag (after "delete all").
    • Read items in order by looping i from 1 to length of list.
    • Find the maximum value in a list of numbers.
    • Check membership with "<(list) contains (item)?>".
    Chapter 11: Lists (Ordered Data Collections) — Example
    1. When green flag clicked
    2. Delete all of bag
    3. Add Torch to bag
    4. Add Compass to bag
    5. Say (length of bag) for 2 seconds

    Try it: Creates a 2-item inventory and reports length 2.

    Mini challenge & next steps

    Write a loop that calculates the sum of all numbers stored in a "scores" list.

    Scratch Learning Textbook Home Return to the full 4-stage curriculum overview. Learn more → Scratch Block Dictionary Look up any block used in this chapter. Learn more →

    FAQ

    How long should I spend on "Chapter 11: Lists (Ordered Data Collections)"?

    Aim for 15–20 minutes: read the concept, test the small example, modify one value to see what changes, and try the mini challenge.

    This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.