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 build a program that uses selection using a set of project requirements.

      Key learning points

      1. Software engineers are often given a set of project requirements that they have to turn into code to create a solution.
      2. A larger problem is decomposed into smaller subproblems to make it easier to solve.
      3. A flowchart or pseudocode is often used to design a system before it is created.

      Keywords

      • Project requirements - the features, functions, and tasks that need to be completed for a project

      • Subproblem - a smaller section of a wider problem that has been decomposed to make solving the problem easier

      Common misconception

      All parts of a solution must be coded at the same time and tested that it works once coding has finished.

      Individual subproblems can be approached separately and tested to ensure they work before moving onto the next part. It helps to know parts of a program work as intended.

      Teacher tip

      A checklst of subtasks is provided as an additional resource for this lesson. Encourage pupils to approach other programming tasks in a similar way to provide a means of keeping track of how they are decomposing problems.

      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 the following logical expression evaluate to? (5+3/2) < 5 and 9+2 == 12

      True
      Correct answer: False

      Q2.
      What will the following logical expression evaluate to? 7 == 8-2 or 9 > 6

      Correct answer: True
      False

      Q3.
      What will the logical expression num == (8*3)/2 evaluate to if num = 12?

      Correct Answer: True

      Q4.
      What will the logical expression age > (80/2) evaluate to if age = 40?

      Correct Answer: False

      Q5.
      explain parts of code that are not obvious to someone else looking at your code.

      Correct answer: Comments
      Identifiers
      Program layout
      Naming conventions

      Q6.
      An is the name given to a variable by a programmer.

      Correct Answer: identifier

      6 Questions

      Q1.
      What is a project requirement?

      a type of programming language
      Correct answer: a set of features, functions, and tasks needed for a project
      a program that writes code automatically
      a list of computer errors

      Q2.
      What is a subproblem?

      a problem that has no solution
      a programming error
      Correct answer: a smaller section of a larger problem
      a type of software engineer

      Q3.
      What does a software engineer do?

      repairs computer hardware
      only writes code
      sells software
      Correct answer: designs, builds, and tests programs

      Q4.
      A is a diagram that helps programmers plan how their program should work before they start coding.

      Correct Answer: flowchart, flow chart

      Q5.
      What is decomposition in programming?

      writing code
      removing errors from a program
      Correct answer: breaking a large problem into smaller parts
      deleting unnecessary code

      Q6.
      Why is it important to test a program after writing it?

      to make the program run faster
      Correct answer: to check if the program meets the requirements and works as expected
      to add more features to a program

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