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

      Programming project: subprograms II

      Lesson details

      Learning outcome

      I can implement a program from a design and perform testing to ensure it works as expected.

      Key learning points

      1. Implementation of solution is where you take a plan and create the solution.
      2. A program should be tested with a range of test data.
      3. Erroneous data is data that should not be accepted by the program or it will cause an error.
      4. Boundary test data is data of the correct type which is on the very edge of being valid.
      5. Normal data is data that should be accepted by a program. This is data that you would expect a user to enter.

      Keywords

      • Erroneous - data that should not be accepted by the program or it will cause an error

      • Boundary - data that should either be accepted or rejected by a program, it tests the data right at the boundary of a range

      • Normal - data that should be accepted by a program, this is data that you would expect a user to enter

      Common misconception

      A system should only be tested with normal data that will be expected.

      A system should be tested with a range of test data, including erroneous data that is not meant to be accepted.

      Teacher tip

      This sceanrio can be tailored to better suit the interests of your pupils. The more they are familiar with the context of the problem they are solving, the easier it will be for them to focus on the creation of the program rather than understanding the problem itself.

      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 is the purpose of a structure chart?

      to visually represent the steps of an algorithm
      to display the output of a program
      to replace the need for flowcharts
      Correct answer: to decide the hierarchy of subprograms in a program

      Q2.
      Which flowchart symbol is used to represent a decision?

      rectangle
      parallelogram
      Correct answer: diamond
      oval

      Q3.
      Which of the following correctly defines a parameter in a subprograms?

      Correct answer: a variable passed into a subprogram
      a value returned by a subprogram
      a type of loop in programming
      a function that runs at the start of a program

      Q4.
      A chart is a diagram used to illustrate the steps of an algorithm.

      Correct Answer: flow

      Q5.
      Match the flowchart symbols with their meaning.

      Correct Answer:oval,start/end of the program

      start/end of the program

      Correct Answer:rectangle,process

      process

      Correct Answer:diamond,decision

      decision

      Correct Answer:parallelogram,input/output

      input/output

      Q6.
      What should be used if a subprogram needs to pass a value back to the main program?

      a parameter
      a variable
      Correct answer: a return value
      a loop

      6 Questions

      Q1.
      What is the purpose of iterative testing in programming?

      to test the final version of the program only
      Correct answer: to test throughout the program's creation and fix errors early
      to test only erroneous data
      to ensure the program runs without any debugging

      Q2.
      Which type of test data is used to check that values at the edge of a range are accepted?

      erroneous
      normal
      Correct answer: boundary
      exceptional

      Q3.
      Final testing occurs when ...

      each block of code is tested separately.
      Correct answer: the entire program is completed.
      errors are corrected during development.
      the program is still in the early design phase.

      Q4.
      A test is a way to thoroughly check that a program is working correctly.

      Correct Answer: table

      Q5.
      Using a of test data helps ensure that a program correctly handles all possible inputs.

      Correct Answer: range

      Q6.
      Match the test data type with its meaning.

      Correct Answer:erroneous,data that should not be accepted because it causes an error

      data that should not be accepted because it causes an error

      Correct Answer:boundary,data at the limits of validity

      data at the limits of validity

      Correct Answer:normal,data that should be accepted as valid input

      data that should be accepted as valid input


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