Skip to content
Menu

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.

Whiteboard video lesson: A finished project

16-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Decompose a problem
  • Combine lists and functions
  • Test with three types of data
  • Evaluate a program

The method

  1. Decompose the problem.
  2. Design inputs, processes, outputs.
  3. Code and test one function at a time.
  4. 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.)

  1. Step 1: Read the code

Answer: Excellent

Question 2

What does this code print? (The code is shown below.)

  1. Step 1: Read the code

Answer: Keep practising

Question 3

What does this code print? (The code is shown below.)

  1. Step 1: Read the code

Answer: Good