New
New
Year 10
OCR

Programming project: sequence II

I can implement a program from a design and test the program.

New
New
Year 10
OCR

Programming project: sequence II

I can implement a program from a design and test the program.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Completing an implementation ensures that all intended functionality is present.
  2. Testing checks that code behaves correctly and meets requirements.

Keywords

  • Implementing - writing and developing code to create a working program based on a design or plan

  • Testing - running a program with different inputs to check for errors and ensure it works as expected

Common misconception

Testing is just about making sure the program runs.

It's not just about running the program. We test to make sure the program does exactly what it's supposed to do, in all situations. This means checking if it handles correct input and incorrect input correctly.


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

Demonstrate a set of test cases for a program. Have the students predict the expected output for each test, then run the program to check their predictions.
Teacher tip

Equipment

Pupils need to code their program so will require access to the usual coding environment that they use. Content in this lesson is based around the Raspberry Pi Code Editor.

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

6 Questions

Q1.
What is a data type?
a specific kind of variable
Correct answer: defines data and actions
a data conversion method
a fixed program value
Q2.
Which is an example of casting?
declaring a variable
assigning a variable value
naming a constant
Correct answer: changing float to integer
Q3.
What is the purpose of naming conventions?
Correct answer: improve code readability
make code harder to read
assign values to variables
declare constants in code
Q4.
What is assigning a starting value to a variable called?
declaration
casting
Correct answer: initialisation
data typing
Q5.
Match the terms with examples:
Correct Answer:integer,42

42

Correct Answer:Boolean,True

True

Correct Answer:string,"Hello"

"Hello"

Correct Answer:float,3.14

3.14

Q6.
What is a visual representation of a process or algorithm using symbols and arrows?
Correct Answer: flowchart, flow chart

6 Questions

Q1.
What does implementing a program involve?
Correct answer: writing and developing code
running the program
checking for errors
designing the code structure
Q2.
Match the terms with their definitions:
Correct Answer:implementing,writing and developing code

writing and developing code

Correct Answer:testing,checking for errors and meeting requirements

checking for errors and meeting requirements

Correct Answer:correct input,input the program expects

input the program expects

Correct Answer:incorrect input,input the program does not expect

input the program does not expect

Q3.
What is the f-string statement to display the value of a variable called total to 2 decimal places?
Correct Answer: {total:.2f}
Q4.
What is the main goal of testing a program?
to make sure it runs
Correct answer: to ensure it meets requirements
to improve its speed
to make it more readable
Q5.
What is the purpose of handling incorrect input during testing?
to improve code readability
to make the program run faster
to simplify implementation
Correct answer: to ensure the program behaves correctly
Q6.
Which of the following is NOT part of testing?
running the program
checking for errors
ensuring requirements are met
Correct answer: writing the code

Additional material

Download additional material