Exclusive Practice Resource

GCSE

Computer Science

Unofficial Practice Paper: J277/02: Computational Thinking, Algorithms and Programming

General Certificate of Secondary Education

Mark Scheme for June 2026 [VERSION D]

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).
Version D Mark Scheme (Section A)
Question Answer / Indicative Content Mark Guidance
1 (a) Definition: Breaking a complex problem down into smaller, more manageable sub-problems [1].
Example: Identifying that a weather app needs separate modules for data collection (from sensors), data processing (calculations), and UI display [1]. Another mark for identifying a specific sub-task (e.g. "Calculating the average temperature") [1].
3 Must include definition + relevant context example.
1 (b) 1 mark per point (max 4):
  • The algorithm starts with the second item in the list [1].
  • It compares the current item to the items to its left [1].
  • Items larger than the current item are shifted to the right [1].
  • The current item is inserted into its correct position [1].
  • This repeats until the end of the list is reached [1].
4 Award 4 marks for a clear technical description.
1 (c) Pre-condition: The array must be sorted [1]. 1 Must mention "sorted".
1 (d) Efficiency: It is more efficient because it halves the search area with each comparison [1]. This results in fewer steps than a linear search for large datasets [1]. 2 Focus on "halving" and "large datasets".
2 (a) High-Level: Easier to read/write as it uses English-like keywords [1]. It is portable/hardware independent [1].
Low-Level: Harder to read as it uses mnemonics or binary [1]. It provides direct control over CPU registers/memory and is highly efficient [1].
4 Must cover both HLL and LLL.
2 (b) Need: Computers can only execute machine code (binary) [1]. Translators convert high-level source code into machine code [1].
Compiler: Translates the entire source code at once to create an executable file [1].
Interpreter: Translates and executes the code line-by-line [1].
4 Award marks for the "Need" and the "Differences".
2 (c) 1 mark per tool (max 2):
  • Editor [1]
  • Error diagnostics [1]
  • Run-time environment [1]
  • Translator [1]
2 Accept any valid IDE tool from the spec.
Version D Mark Scheme (Section A Continued)
Question Answer / Indicative Content Mark Guidance
3 (a) Definition: Manually converting a variable from one data type to another [1].
Reason: Inputs (from input()) are always strings [1]; they must be cast to Real to allow for decimal calculations [1].
2 Note: Must link to input being a string or allowing calculations.
3 (b) 1 mark per gate/connection:
  • AND gate with inputs A and B [1]
  • NOT gate with input C [1]
  • AND gate with inputs B and (NOT C) [1]
  • OR gate taking outputs of both AND gates [1]
4 Verify circuit diagram connectivity.
3 (c) 1 mark per two correct rows:
  • 0,0,0: 0
  • 0,0,1: 0
  • 0,1,0: 1 (B is 1, NOT C is 1, so B AND NOT C is 1)
  • 0,1,1: 0
  • 1,0,0: 0
  • 1,0,1: 0
  • 1,1,0: 1 (A AND B is 1)
  • 1,1,1: 1 (A AND B is 1)
4 P Column: 0, 0, 1, 0, 0, 0, 1, 1
4 (a) 1 mark per point:
  • Ensures only authorised users can access the system [1].
  • Passwords verify the user's identity [1].
  • 2-Factor Authentication adds an extra layer (e.g. phone code) if a password is stolen [1].
  • Protects sensitive data from unauthorised modification/viewing [1].
4 Link to "defensive design".
4 (b) 1 mark per category:
  • Normal: e.g. 3 [1] - Within range [1]
  • Boundary (Low): 1 [1] - Lowest valid value [1]
  • Boundary (High): 7 [1] - Highest valid value [1]
  • Invalid: e.g. 0 // 8 // "Monday" [1] - Outside range / incorrect type [1]
6 Award 1 mark for data, 1 mark for reason (max 6).
Version D Mark Scheme (Section B)
Question Answer / Indicative Content Mark Guidance
5 (a) SELECT Species, Location [1]
FROM Sightings [1]
WHERE WaterTemp > 15 [2]
4 2 marks for WHERE clause (correct field + operator).
5 (b) Syntax Error: Missing then keyword on line 02 [1].
Correction: if depth > 100 then [2].
Logic Error: Uses print() instead of return [1]. Functions must return a value to the calling statement.
Correction: return O2 [2].
6 Must identify the specific technical error.
6 (a) Example Algorithm:
do [1]
  pH = real(input("Enter pH level")) [1]
until pH >= 0.0 AND pH <= 14.0 [2]
print("pH Validated") [1]

Marks:
- Initial do [1]
- Input inside loop [1]
- Casting to real [1]
- Correct until condition [2]
- Correct AND logic [2]
- Final print [1]
8 Accept equivalent logic using NOT (pH < 0 or pH > 14).
6 (b) Because the condition is checked after the code inside the loop has run at least once [1]. This ensures the code always executes at least one time [1]. 2 Focus on "checked after execution".
Version D Mark Scheme (Section B Continued)
Question Answer / Indicative Content Mark Guidance
7 (a) 1 mark per point:
  • Initialise total to 0 [1]
  • Nested loop to traverse 2D array [2] (e.g. for x=0 to 9 and for y=0 to 9)
  • Check if seaMap[x, y] == True [2]
  • Increment total [2]
  • Output final total after loops [1]
8 Must use nested loops for 2D array.
7 (b) DIV: 4 [1]
MOD: 2 [1]
2 14 / 3 = 4 remainder 2.
8 (a) 1 mark per point:
  • newFile("log.txt") [1]
  • Open file for writing (implicit or explicit) [1]
  • file.writeLine("Monitoring Started") [1]
  • Loop for i = 0 to 9 [1]
  • file.writeLine(tempData[i]) [2]
  • file.close() [1]
  • Correct indexing of array [1]
8 Must use `newFile()` command as per spec update.
8 (b) A Function must return a value to the part of the program that called it [1]. A Procedure simply executes a block of code and does not return a value [1]. 2 Must mention the "return value" distinction.
TOTAL MARKS: 80