Exclusive Practice Resource

Monday 25 May 2026 - Afternoon

GCSE (9-1) Computer Science

Unofficial Practice Paper: J277/02 Computational Thinking, Algorithms and Programming [VERSION D]

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
2

SECTION A

1

(a) Define the term Decomposition and provide a real-world example related to designing a weather forecast application.

[3]

(b) Describe the step-by-step process of an Insertion Sort.

[4]

(c) State the pre-condition that must be met before a Binary Search can be performed on an array.

[1]

(d) Explain why a Binary Search is more efficient than a Linear Search for large datasets.

[2]
Turn over
3
2

(a) Compare High-Level Languages and Low-Level Languages. Refer to ease of programming and direct control over hardware in your answer.

[4]

(b) Explain the need for Translators (Compilers and Interpreters) when writing software in a high-level language.

[4]

(c) Identify two tools provided by an Integrated Development Environment (IDE) that assist a programmer.

1.

2.

[2]
Turn over
4
3

(a) Define the term Casting and provide one reason why a user's input might need to be cast to a Real data type.

[2]

(b) Draw a logic gate circuit for the Boolean expression: P = (A AND B) OR (B AND NOT C)

A
B
C
P
[4]

(c) Complete the truth table for the Boolean expression in part (b).

ABCP
000
001
010
011
100
101
110
111
[4]
5
4

(a) Describe how Authentication (e.g. passwords and two-factor authentication) contributes to the defensive design of a computer system.

[4]

(b) A program accepts a "Day of the Week" as an integer (1 to 7).

Complete the test plan table with appropriate test data for each category.

Test CategoryTest Data ExampleReason for Test
Normal
Boundary (Low)
Boundary (High)
Invalid
[6]
Turn over
6

SECTION B

Context: OceanGuard (Marine Life Monitoring)

5

(a) The OceanGuard system uses a database table called `Sightings` with fields `Species`, `WaterTemp`, and `Location`.

Write an SQL query to output the `Species` and `Location` of all sightings where the `WaterTemp` is greater than 15.

SELECT FROM WHERE
[4]

(b) A programmer has written the following flawed subprogram to calculate oxygen levels.

01 function calculateO2(depth, temp) 02 if depth > 100 03 O2 = 0.5 * temp 04 else 05 O2 = 0.8 * temp 06 endif 07 print(O2) 08 endfunction

Identify the Syntax Error on line 02 and the Logic Error on line 07, and write the corrected lines of code.

Syntax Error Correction (Line 02):

Logic Error Correction (Line 07):

[6]
7
6

(a) Write an algorithm using a DO UNTIL loop that:

[8]

(b) State the technical reason why a `DO UNTIL` loop is described as a "post-condition" loop.

[2]
7

(a) A 2D array `seaMap[10, 10]` stores `True` if a shark is detected at that coordinate, and `False` otherwise.

Write an algorithm using iteration to calculate and output the total count of sharks detected in the entire map.

[8]

(b) Identify the result of the following arithmetic operations:

14 DIV 3 =

14 MOD 3 =

[2]
Turn over
8
8

(a) Write an algorithm that performs the following file operations:

[8]

(b) Explain the difference between a Procedure and a Function.

[2]
END OF QUESTION PAPER