Exclusive Practice Resource

Thursday 21 May 2026 - Afternoon

GCSE (9-1) Computer Science

Unofficial Practice Paper: J277/02 Computational thinking, algorithms and programming [VERSION G]

Time allowed: 1 hour 30 minutes

Centre number
Candidate number
First name(s)
Last name

INSTRUCTIONS

Answer all the questions.

The total mark for this paper is 80.

Turn over
2
1

(a) A program is designed to calculate the total cost of a shopping basket. Identify the inputs, processes, and outputs for this program.

[5]

(b) Draw a structure diagram for a system that manages a "Smart Home". The system should include sub-modules for "Heating", "Security", and "Lighting".

[5]
2

(a) Draw the logic diagram for the following Boolean expression: (A AND B) OR (NOT C).

[5]

(b) Complete the truth table for the expression in 2(a).

ABCA AND BNOT CResult
000
001
010
011
100
101
110
111
[5]
3
3

(a) Explain the difference between a Binary Search and a Linear Search. State one condition required for a binary search to work.

[5]

(b) Describe how a Bubble Sort algorithm works to sort an array of numbers into ascending order.

[5]

(c) Perform a Binary Search for the number 18 in the following list. Show the state of the list at each step.

[2, 5, 8, 12, 15, 18, 22, 25, 30]

[10]
4
4

(a) Explain the three basic programming constructs: Sequence, Selection, and Iteration. Provide a short pseudocode example for each.

[10]

(b) The following algorithm has a logic error. Identify the error and provide a refined version of the code.

x = input("Enter score") if x > 50: print("Pass") else: print("Fail") # Goal: Score must be 50 or MORE to pass.

Identification:

Refined Code:

[10]
5
5

(a) Explain what is meant by Casting and why it is necessary when a user inputs their age.

[5]

(b) Identify the most suitable data type for the following pieces of data:

  • The price of a chocolate bar:
  • A person's middle initial:
  • Whether a light is switched on:
  • The number of students in a class:
  • A person's home address:
[5]
6

(a) Describe how Input Validation and Authentication contribute to the robustness of a program.

[5]

(b) Explain the purpose of testing during the development of a program. Contrast Iterative Testing with Final Testing.

[5]