Year 9 (ages 13–14, Grade 8 in the US) · Computing · Python: lists and functions · Lesson 4
A finished project
Planning, coding, testing and evaluating a small Python project (a quiz scorer) using lists and functions, with normal, boundary and invalid test data.
Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

16-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Decompose a problem
- Combine lists and functions
- Test with three types of data
- Evaluate a program
The method
- Decompose the problem.
- Design inputs, processes, outputs.
- Code and test one function at a time.
- Test normal, boundary, invalid; then evaluate.
Key words: decomposition, function, testing, boundary data, invalid data, evaluation.
Worked examples
Worked examples from the lesson, with every step.
Question 1
What does this code print? (The code is shown below.)
- Step 1: Read the code
Answer: Excellent
Question 2
What does this code print? (The code is shown below.)
- Step 1: Read the code
Answer: Keep practising
Question 3
What does this code print? (The code is shown below.)
- Step 1: Read the code
Answer: Good