Skip to content

Data Structures: Lists and ArraysActivities & Teaching Strategies

Hands-on work with lists and arrays helps students move beyond abstract definitions to concrete understanding. Physical simulations and real-time code tracing make memory structures visible, turning ‘indexing’ from a rule to an intuition.

Year 9Technologies4 activities30 min45 min

Learning Objectives

  1. 1Compare the advantages of using lists over multiple single variables for storing related data in a program.
  2. 2Demonstrate how to access, add, insert, and remove elements from a list using programming code.
  3. 3Analyze the impact of list indexing (zero-based) on algorithm efficiency when retrieving specific data.
  4. 4Construct a program that effectively manages a collection of items using a list data structure.

Want a complete lesson plan with these objectives? Generate a Mission

35 min·Pairs

Pair Programming: Inventory Manager

Pairs create a list to store shop items and prices. They code functions to add new items, remove sold ones, and display totals using loops. Pairs test with classmate inputs and swap code to debug indexing errors.

Prepare & details

Analyze how the choice of data structure impacts algorithm efficiency.

Facilitation Tip: During Pair Programming: Inventory Manager, circulate and listen for students debating whether to insert or append based on whether the item is new or restocked.

Setup: Tables/desks arranged in 4-6 distinct stations around room

Materials: Station instruction cards, Different materials per station, Rotation timer

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
45 min·Small Groups

Small Groups: Efficiency Comparison Challenge

Groups simulate lists and arrays with card stacks: one fixed size, one expandable. They time adding or accessing 20 items, then code versions in a simple editor to compare run times. Discuss results and predict for larger datasets.

Prepare & details

Compare the advantages and disadvantages of lists versus single variables for storing related data.

Facilitation Tip: For Small Groups: Efficiency Comparison Challenge, provide identical data sets on paper strips so groups can literally time each other’s ‘remove first element’ steps.

Setup: Tables/desks arranged in 4-6 distinct stations around room

Materials: Station instruction cards, Different materials per station, Rotation timer

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
40 min·Whole Class

Whole Class: High Score Board Builder

Project a starter code with a list for game scores. Class suggests append, sort, and slice operations step-by-step, coding live. Vote on modifications and observe output changes to explore collection management.

Prepare & details

Construct a program that manages a collection of items using a list.

Facilitation Tip: In Whole Class: High Score Board Builder, invite pairs to justify their choice of list versus array when the class size fluctuates mid-semester.

Setup: Tables/desks arranged in 4-6 distinct stations around room

Materials: Station instruction cards, Different materials per station, Rotation timer

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
30 min·Individual

Individual: Personalized Playlist Organizer

Students build a list-based program for music tracks, including insert, delete, and search functions. They input their favorites, test edge cases like empty lists, and reflect on why lists beat variables.

Prepare & details

Analyze how the choice of data structure impacts algorithm efficiency.

Facilitation Tip: For Individual: Personalized Playlist Organizer, ask students to print their final playlist length and justify why a list was preferable to seven variables.

Setup: Tables/desks arranged in 4-6 distinct stations around room

Materials: Station instruction cards, Different materials per station, Rotation timer

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills

Teaching This Topic

Start with physical manipulatives—index cards labeled 0, 1, 2—to establish zero-based indexing before touching keyboards. Avoid teaching array syntax first; let the frustration of fixed-size errors motivate the need for lists. Research shows that students grasp performance concepts more deeply when they feel the slowdown themselves, so time trials are essential.

What to Expect

Students will confidently choose between lists and arrays, correctly use zero-based indexing, and explain why dynamic resizing or fixed capacity matters in everyday programs. Their code will compile without off-by-one errors and complete operations efficiently.

These activities are a starting point. A full mission is the experience.

  • Complete facilitation script with teacher dialogue
  • Printable student materials, ready for class
  • Differentiation strategies for every learner
Generate a Mission

Watch Out for These Misconceptions

Common MisconceptionDuring Small Groups: Efficiency Comparison Challenge, watch for students assuming ‘append’ always takes the same time regardless of list size.

What to Teach Instead

Have groups time three appends on a list that already contains 100 items and again on a list with 10,000 items, then present their average times to the class.

Common MisconceptionDuring Pair Programming: Inventory Manager, watch for students treating lists and arrays as interchangeable.

What to Teach Instead

Ask each pair to deliberately trigger an IndexError by trying to add to a full array, then discuss why a list would avoid this problem.

Common MisconceptionDuring Whole Class: High Score Board Builder, watch for students counting positions starting at 1.

What to Teach Instead

Circulate with a marker and relabel the first cell on the whiteboard as index 0, then have the class re-write the high score insertion code accordingly.

Assessment Ideas

Quick Check

After Pair Programming: Inventory Manager, display a 5-line code snippet on the board that uses a list to store items. Ask students to write on a sticky note the index of ‘backpack’ and the single line to add ‘water bottle’ to the end.

Discussion Prompt

After Small Groups: Efficiency Comparison Challenge, pose the scenario: ‘A program must store daily temperatures for the next 365 days. Would you use a list or an array? Ask each group to state their choice and give one efficiency reason based on their timed trials.

Exit Ticket

During Whole Class: High Score Board Builder, collect each student’s exit ticket listing one advantage of a list over seven separate variables and one operation they performed on their high score list.

Extensions & Scaffolding

  • Challenge: Add a search function to the playlist that returns the index of a requested song using binary search if the list is sorted.
  • Scaffolding: Provide pre-labeled index cards for students struggling with insertion to arrange before typing the code.
  • Deeper exploration: Compare memory usage of a list versus array for 10,000 elements using Python’s sys.getsizeof().

Key Vocabulary

ListA data structure that can hold an ordered collection of items. Lists are mutable, meaning their contents can be changed after creation.
ArrayA data structure that stores a fixed-size sequential collection of elements of the same type. Accessing elements is typically very fast.
IndexA numerical position of an item within a list or array, starting from zero for the first item.
IterationThe process of repeating a set of instructions for each item in a collection, such as a list or array.

Ready to teach Data Structures: Lists and Arrays?

Generate a full mission with everything you need

Generate a Mission