icon-background-square
New
New
Year 9

Data structure projects in Python

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

icon-background-square
New
New
Year 9

Data structure projects in Python

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

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

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.


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

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.
speech-bubble
Teacher tip
equipment-required

Equipment

All pupils require access to devices that can edit and run Python programs. Starter code files are available to copy or use directly via the Raspberry Pi Foundation's Code Editor.

copyright

Licence

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

Lesson video

Loading...

6 Questions

Q1.
Match the term to its definition.
Correct Answer:index,the location of an item in a list
tick

the location of an item in a list

Correct Answer:mutable,able to be changed
tick

able to be changed

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

a data type that is a collection of characters

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

a collection of data in a particular sequence

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

take an item away from a list

Correct Answer:operator,a symbol for a specific calculation
tick

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: