icon-background-square
New
New
Year 10
AQA

Programming project: selection II

I can implement a solution to a problem that requires the use of selection.

icon-background-square
New
New
Year 10
AQA

Programming project: selection II

I can implement a solution to a problem that requires the use of selection.

warning

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.

Lesson details

Key learning points

  1. Testing a program can help you to identify and spot errors.
  2. A test plan is a document that sets out the tests that will be carried out during testing.
  3. Once testing is complete, a program can be refined to correct any errors and make improvements.

Keywords

  • Test plan - a document that sets out the tests that will be carried out during testing

  • Syntax error - an error where the code has been structured incorrectly and the syntax rules haven’t been followed

  • Logic error - an error where the program will run, but won’t do what the programmer expected

Common misconception

If a program has a logic error it will not work and will give error messages.

Logic errors are errors that cause a program to work incorrectly or unexpectedly. With a logic error, the program can be run without failing, but it does not return the expected result. The user might not realise that there is an error.


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

This is the second lesson of a project to allow pupils to apply their understanding of selection. It would be benefical if pupils have completed part I before attempting this lesson.
speech-bubble
Teacher tip
equipment-required

Equipment

All pupils require access to devices that can edit and run Python programs. Starter code files are available to copy or use directly via the Raspberry Pi Code Editor.

copyright

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.
is a way of expressing an algorithm that is independent of a specific programming language.
Correct Answer: pseudocode
Q2.
What is the missing stage of the software development life cycle? Planning, analysis, , development, testing, implementation.
Correct Answer: design
Q3.
At which stage of the software development life cycle do you start to create a program?
analysis
design
Correct answer: development
testing
Q4.
What is nested selection in programming?
a type of loop that repeats a block of code
Correct answer: a selection statement placed inside another selection statement
a way to store multiple values in a list
Q5.
Match the logical operator to its function.
Correct Answer:AND,returns True if both conditions are True
tick

returns True if both conditions are True

Correct Answer:OR,returns True if at least one condition is True
tick

returns True if at least one condition is True

Correct Answer:NOT,reverses the result of a condition
tick

reverses the result of a condition

Correct Answer:,
tick

Correct Answer:,
tick

Correct Answer:,
tick

Q6.
Match the relational operator to its meaning.
Correct Answer:>,greater than
tick

greater than

Correct Answer:<,less than
tick

less than

Correct Answer:==,equal to
tick

equal to

Correct Answer:!=,not qual to
tick

not qual to

Correct Answer:>=,greater than or equal to
tick

greater than or equal to

Correct Answer:<=,less than or equal to
tick

less than or equal to

6 Questions

Q1.
What is the purpose of a test plan in programming?
to write the actual program code
to design the user interface
Correct answer: to set out the tests that will be carried out during testing
to decide how the project will be implemented
Q2.
A error occurs when the program may run, but does not perform as expected.
Correct Answer: logic
Q3.
A error happens when the program has incorrect syntax and will not run.
Correct Answer: syntax
Q4.
Match the test data type to its description.
Correct Answer:normal,values that should be accepted as they are valid
tick

values that should be accepted as they are valid

Correct Answer:erroneous,values that should not be accepted and will cause an error
tick

values that should not be accepted and will cause an error

Correct Answer:boundary,values that are at the edge of being valid
tick

values that are at the edge of being valid

Q5.
Which of the following is an example of erroneous test data for a program that asks for an age (expected input: an integer)?
25
0
Correct answer: twenty-five
18
Q6.
In the software development life cycle, is the stage that follows development and involves checking for errors.
Correct Answer: testing