Back to Develop Code

Oak National Academy

Lessons written by expert teachers in England, each with slides, a video and quizzes.

Their topic:
Programming: subprograms · Programming: subroutines · Programming: sequence
For your topic:
Develop Code · Computer Science - 4CP0

Use these lessons alongside our lesson note, which covers your syllabus in full.

What this covers in your syllabus

3 lessons from Oak National Academy

Lesson 1 of 3 · GCSE level, ages 14 to 16

Programming project: subprograms II

By the end: 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

A common mistake

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

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

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What is the purpose of iterative testing in programming?
Which type of test data is used to check that values at the edge of a range are accepted?
Final testing occurs when ...

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

Lesson 2 of 3 · GCSE level, ages 14 to 16

Programming project: subroutines II

By the end: 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 data is data that should either be accepted or rejected by a program.
  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

A common mistake

Mistake: A system should only be tested with normal data that will be expected. If it works with normal data it will work all the time.

In fact: A system should be tested with a range of test data, including erroneous data that is not meant to be accepted. Programs should make sure that there is no way to stop the software from working if invalid inputs are entered.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What is the purpose of iterative testing in programming?
Which type of test data is used to check that values at the edge of a range are accepted?
Final testing occurs when ...

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

Lesson 3 of 3 · GCSE level, ages 14 to 16

Variables and constants in programs

By the end: I can apply appropriate naming conventions and explain the differences between variables and constants.

Key learning points

  1. Naming conventions improve code readability and maintainability.
  2. A variable is a named piece of data stored in a computer’s memory.
  3. A variable can be accessed and changed by a computer program.
  4. Variables must be declared and assigned values in a program.
  5. Constants hold fixed values that do not change throughout the running of the program.

Keywords

variable
a named piece of data stored in a computer’s memory which can be accessed and changed by a computer program
declaration
the process of stating the name of a variable or constant and defining its data type
initialisation
assigning a starting value to a variable to let the compiler know that a memory location is required
constant
a value that cannot be changed during the execution of a program

A common mistake

Mistake: You can define a constant in any programming language.

In fact: Python does not have constants. But if you want a value to be treated as a constant, it's a common naming convention for the identifier to be written in capital letters.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What is a variable?
What is a constant?
What is the purpose of naming conventions?
What is initialisation in programming?
Is it possible to define a constant in Python?

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

The wording comes from each publisher. The layout and the links to your syllabus are ours.