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

      Data structure projects in Python

      Lesson details

      Learning outcome

      I can apply my understanding of data structures and iteration to investigate a problem.

      Key learning points

      1. Data can be used to investigate a problem.
      2. Programming tools can be used to perform investigations on data held in data structures.
      3. When investigating a problem using code, it is useful to follow the software development life cycle.
      4. Data structures, iteration and operations can be combined to make more complex programs in Python.

      Keywords

      • Investigate - examine data carefully to find out the truth about something

      • Rounding - reducing the number of digits in a number by examining the digits that follow that will be discarded

      Common misconception

      Python will automatically round numbers to the nearest whole number.

      Python will perform calculations based on the values that have been provided and generate an answer that can include fractional parts. If you want to reduce the number of digits, you can use the round() function.

      Teacher tip

      If pupils want to extend their investigations, they could set their own questions to be answered using the data set provided. Encourage them to think about how the data can be used.

      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.
      Match the term to its definition.

      Correct Answer:index,the location of an item in a list

      the location of an item in a list

      Correct Answer:mutable,able to be changed

      able to be changed

      Correct Answer:string,a data type that is a collection of characters

      a data type that is a collection of characters

      Correct Answer:list,a collection of data in a particular sequence

      a collection of data in a particular sequence

      Correct Answer:remove,take an item away from a list

      take an item away from a list

      Correct Answer:operator,a symbol for a specific calculation

      a symbol for a specific calculation

      Q2.
      What does the append method do in Python?

      removes an item from a list
      sorts a list in alphabetical order
      Correct answer: adds an item to the end of a list
      finds the index of an item

      Q3.
      What is the term for repeating a sequence of instructions?

      Correct Answer: Iteration, loop, looping

      Q4.
      What is a for loop used for?

      to perform a single operation
      Correct answer: to iterate through a list a specific number of times
      to iterate through a list as long as a condition is met
      to stop the execution of a program

      Q5.
      What is a floating-point number in Python?

      an integer value
      a sequence of characters
      Correct answer: a number with a decimal point
      a Boolean value

      Q6.
      How are lists defined in Python?

      using angle brackets < >
      using parentheses ( )
      using curly braces { }
      Correct answer: using square brackets [ ]

      6 Questions

      Q1.
      Put these steps in order to represent the software development life cycle.

      1 - planning
      2 - analysis
      3 - design
      4 - development
      5 - testing
      6 - implementation

      Q2.
      What is the primary purpose of the analysis phase in the software development life cycle?

      to write code for the software
      Correct answer: to identify and document the requirements of the project
      to test the software for bugs
      to deploy the software to users

      Q3.
      Which data type allows for fractional values in Python?

      integer
      Boolean
      string
      Correct answer: floating-point

      Q4.
      How do you use the round() function to round the number 3.14159 to two decimal places in Python?

      Correct Answer: round(3.14159, 2), round(3.14159,2)

      Q5.
      How do you access the third item in a list called myList in Python?

      Correct answer: `myList[2]`
      myList[3]
      myList[1]
      myList[0]

      Q6.
      How do you iterate through each item in a list called myList using a for loop in Python? Hint: Use the variable 'item'.

      Correct Answer: for item in myList:

      To help you plan your 9 computing lesson on: Data structure projects in Python, download all teaching resources for free and adapt to suit your pupils' needs...