Exclusive Practice Resource

Friday 22 May 2026 - Afternoon

GCSE (9-1) Computer Science

Unofficial Practice Paper: J277/02 Computational Thinking, Algorithms and Programming [Version F]

Time allowed: 1 hour 30 minutes

Centre number
Candidate number
First name(s)
Last name

INSTRUCTIONS

This is an unofficial practice resource created exclusively for gcsecomputerscience.co.uk. It is not endorsed by, affiliated with, or approved by Oxford Cambridge and RSA Examinations (OCR).
Turn over
SECTION A
1

Principles of Computational Thinking.

(a) Define the following terms:

Abstraction:

Decomposition:

[4]

(b) A smart thermostat system controls the temperature in a home. Identify the **inputs**, **processes**, and **outputs** for this system.

Inputs:

Processes:

Outputs:

[4]
Turn over
2

Algorithms and Logic.

(a) A program uses a Bubble Sort algorithm to sort the following list of numbers in ascending order:

8, 5, 2, 7, 3

Show the state of the list after the first full pass of the algorithm.

[4]

(b) A security system uses a logic circuit. The alarm (A) sounds if the sensor (S) detects movement AND the system is armed (M), OR if the panic button (P) is pressed.

Complete the truth table for this logic circuit:

SMPA
0000
0011
010
011
100
110
[6]
Turn over
3

Robust Programs and Testing.

(a) Explain how **Anticipating Misuse** helps a developer create a robust program. Give one example of a technique used.

[4]

(b) Compare **Iterative Testing** and **Final/Terminal Testing**.

[6]

(c) A programmer discovers a Logic Error in their code. Define what is meant by a logic error and explain how it differs from a Syntax Error.

[5]
Turn over
4

Programming Fundamentals.

(a) Identify the three basic programming constructs used to control the flow of a program.

[3]

(b) State the correct data type (e.g. Integer, Real, Boolean, String) for the following variables:

age = 15 :

price = 4.99 :

is_valid = True :

name = "Alex" :

[4]

(c) A database stores student information. A Record is used to group related data. Define the structure of a record that could store a student's ID, Name, and whether they have paid their fees.

[5]
Turn over
SECTION B
5

Algorithm Design and Refinement.

The following algorithm is intended to check if a user is old enough to vote (age 18 or over). However, it contains several errors.

age = input("Enter your age") if age > 18 then print("You can vote") else print("Too young") endif

(a) Identify **three** errors or potential improvements to make this algorithm more robust.

[6]

(b) Rewrite the algorithm in **pseudocode** or a high-level language of your choice, ensuring it is robust and error-free.

[9]
Turn over
6

15-Mark Programming Challenge.

Write an algorithm (pseudocode or high-level language) that:

[15]