Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

      I can describe the differences between lists and arrays and use a list in a program.

      Key learning points

      1. Data structures are used to store data in an organised and accessible way.
      2. Data structures can be static or dynamic.
      3. Static data structures reserve memory locations for a set amount of data. Their size cannot change.
      4. Dynamic data structures are more flexible. The memory capacity is not fixed.

      Keywords

      • Static - a data structure that has a fixed size in memory

      • Dynamic - a data structure that can grow or shrink to accommodate items

      • Array - a static data structure that contains items of the same data type

      • List - a dynamic data structure that can contain items of different data types

      Common misconception

      Arrays and lists behave in the same way.

      An array has a predefined fixed size. A list can vary in size throughout program execution.

      Teacher tip

      Some exam boards do not require a differentiation between list and arrays. Make sure you are clear what is needed to be learnt for the exam specification you are teaching

      Equipment

      Pupils will need access to a device that can edit and run Python programs. Examples in this lesson use the RPF Code Editor https://oak.link/python-editor

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      What will be the output of this program?
      12
      word = "MOONLIGHT" print(word.lower())
      Code colour

      Correct answer: moonlight
      MOONLIGHT
      Moonlight
      MoonLight

      Q2.
      What does the random.choice() function do?

      creates a new random list
      Correct answer: selects a random item from a list or string
      removes a random item from a list
      sorts a list in random order

      Q3.
      What will be the output of this program?
      12
      fruit = "Strawberry" print(fruit[5:10].upper())
      Code colour

      strawBERRY
      STRAWberry
      Correct answer: BERRY
      STRAW

      Q4.
      is a way of joining strings using the + operator to make a new string.

      Correct Answer: Concatenation

      Q5.
      is the process of checking an input meets certain requirements.

      Correct Answer: Validation

      Q6.
      What must be included in a Python program to use the random module?

      insert random
      use random
      Correct answer: `import random`
      from random import shuffle

      6 Questions

      Q1.
      Which of the following is true about arrays?

      Arrays are dynamic data structures that allow adding and deleting items.
      Arrays store items of different data types.
      Correct answer: The size of an array is fixed, and items must all be of the same type.
      Arrays can grow or shrink in size as needed.

      Q2.
      What is the correct way to create a list in Python?

      planets = ("Mercury", "Venus", "Earth")
      Correct answer: `planets = ["Mercury", "Venus", "Earth"]`
      planets = {Mercury, Venus, Earth}
      planets = "Mercury", "Venus", "Earth"

      Q3.
      In Python, the index of the first item in a list starts at .

      Correct Answer: 0, zero

      Q4.
      Which of the following methods allows you to pick a random planet from the list planets?

      random.select(planets)
      Correct answer: `random.choice(planets)`
      random.shuffle(planets)

      Q5.
      Lists are data structures, meaning they can have items added or removed and can store different data types in the same list.

      Correct Answer: dynamic

      Q6.
      Arrays are data structures, meaning they cannot have items added or removed and they must contain items of the same data type.

      Correct Answer: static

      To help you plan your 10 computer science lesson on: Arrays and lists, download all teaching resources for free and adapt to suit your pupils' needs...