Community resourceWorksheet

Y9-L01 Lists: plan a film night

Part 1 of 3 · Y9 Lists

Pupils build and edit simple Python lists for a film night theme. They create lists, read items by index, append, remove, pop, and use if plus in to avoid errors, so it teaches core list operations and basic defensive programming. The worksheet starts very guided and becomes a little more open ended by the final tasks, so it is moderate in demand.

Shared by Mr HopkinsonVerified teacher

  • 30 cells
  • CC BY-SA 4.0
  • Shared 12 Nov 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Lists: plan a film night

Build a film-night list. No loops needed.

Follow each Task heading. Use the folded hints when needed. Run shows output; Check my answer tests your answer. Each program starts its own list.

A list keeps several related items in order, under one name. Each film title is one item.

films = ["Wicked", "Matilda", "Moana"]

Use square brackets [ ], commas between items, and quotes around text.

Task 1: Spot a list

Choose one answer below.

Multiple choice1 mark

Why use a list for three film titles?

  • AIt sorts the titles automatically.
  • BIt keeps the titles in order under one name.
  • CIt changes all titles to numbers.
  • DIt stores only the first title.

Find an item

An index is an item’s position number. Python starts at 0. Use the diagram:

Film list and indexesWicked is at index 0, Matilda at 1 and Moana at 2. The first index is zero.Index0Wicked1Matilda2Moana

films[0] reads the first item. Printing a whole list shows brackets and quotes.

Task 2: Create and read the list

A. Fill three gaps. Create the film list, then print its first and third titles.

B. Run and check. Expect the whole list, then Wicked, then Moana.

Syntax reminder
pets = ["cat", "dog"]
print(pets)
print(pets[0])
Fill in the code3 marks
films = 1: bracket"Wicked", "Matilda", "Moana"]
print(films)
print(films[2: first])
print(films[3: third])

Task 3: Predict an index

A. Read without running.

games = ["Cluedo", "Uno", "Chess"]
print(games[1])

B. Choose the output below.

Multiple choice1 mark

What is printed?

  • ACluedo
  • BChess
  • CUno
  • D1

Change an item and count the list

CodeJob
films[0] = "Wonka"Replace the first item
len(films)Count the items

Replacing one item does not add an extra item. Three items have indexes 0, 1, 2, but their count is 3.

Task 4: Change the first film

A. Fill two gaps. Replace the first title with Wonka. Print the list and its length.

B. Run. Check the output: the first title changes; the length stays 3.

Fill in the code2 marks
films = ["Wicked", "Matilda", "Moana"]
films[1: index] = "Wonka"
print(films)
print(2: count(films))

Add to the end

films.append(extra_film) adds the value of extra_film to the end. The dot joins the list name to append.

Task 5: Add another film

A. Fill three gaps. Store Wonka in extra_film. Add that variable’s value to the list.

B. Run. Check the output: Wonka should appear last.

Append reminder
snack = "crisps"
snacks.append(snack)

Put quotes around text. Use a variable without quotes to read its value.

Fill in the code3 marks
films = ["Wicked", "Matilda", "Moana"]
extra_film = 1: title
films.2: add(3: value)
print(films)

Task 6: Predict the changed list

A. Read without running.

snacks = ["grapes", "popcorn"]
snacks.append("crisps")

B. Choose two correct statements.

Multiple choice, several answers2 marks

Choose two statements about snacks after this code.

  • Alen(snacks) is 3.
  • B"crisps" is now the first item.
  • Clen(snacks) is 2.
  • D"crisps" is at index 2.

Remove by value

films.remove("Matilda") removes the item with that value. Put text in quotes.

The remaining items keep their order. Their indexes are numbered again from 0.

Task 7: Remove a named film

A. Fill two gaps. Remove Matilda by value.

B. Run. Check the output: only Wicked and Moana should remain.

Fill in the code2 marks
films = ["Wicked", "Matilda", "Moana"]
films.1: remove(2: title)
print(films)

Remove by index

CommandRemoves by
.remove("Matilda")Value: the title
.pop(1)Index: the position number

In the diagram, removing index 1 moves Moana from index 2 to 1.

Indexes change after pop(1)Before: Wicked 0, Matilda 1, Moana 2. Remove index 1. After: Wicked 0 and Moana 1.Before pop(1)0Wicked1Matilda2MoanaAfter pop(1)0Wicked1Moana

Task 8: Fix two index mistakes

A. Fix pop. Remove the second film by index.

B. Fix the final print. Use the diagram’s new index to print Moana.

C. Run and check. Expect the two-film list, then Moana.

Two bracket types

Use .pop(number) to remove an index. Use [number] to read an item. Recount indexes after removing an item.

Coding task2 marks
films = ["Wicked", "Matilda", "Moana"]
films.pop("Matilda")
print(films)
print(films[2])

Check before removing

remove() gives an error if the value is missing. Use your familiar if:

if remove_film in films:
    films.remove(remove_film)

in tests whether the item is there. If it is missing, this block is skipped.

Input reminder: input("Another film? ") shows the question, then waits for your reply. Store the reply in a variable.

Task 9: Plan your final program

Write short notes.

A. Plan the order. How will you take input to add a film, take input to remove a film, then show the list and its length?

B. Plan for a missing title. What should happen if the film to remove is not in the list?

Written answer2 marks

Write your plan for parts A and B.

Students type their answer here.

Task 10: Build your film-night list

A. Complete the starter.

  • Take input for a film in extra_film; append that reply.
  • Take input for a film to remove in remove_film.
  • Use if and in: remove it only when it is there.
  • Print only the updated list, then its length, on two lines.

B. Test twice. Try Wonka / Matilda, then Frozen / Shrek. The second test must not crash. Use capital letters as shown.

C. Check your answer.

Build one part at a time

Keep the starting list. Add the first input and append; test. Add the removal input and if block; test. Finish with the two print commands. Refer to the earlier tasks.

Coding task6 marks
films = ["Wicked", "Matilda", "Moana"]
# Take input for another film and append the reply.

# Take input for a film to remove; check before removing it.

# Print the updated list and its length.

Task 11: Make a book note

Copy one example of each: create a list, read an index, append, remove, pop. Label which deletion uses a value and which uses an index.

Book notes have no platform marks. Complete every Worksheet task.