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 C]

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).
June 2026 Practice Paper (Section A)
Question Answer / Indicative Content Mark Guidance
1 (a) 1 mark per point (max 4):
  • Input Age (or similar process box content) [1]
  • Correctly labelled True/Yes branch [1]
  • Output "Adult" correctly attached to True branch [1]
  • Correctly labelled False/No branch [1]
  • Output "Child" correctly attached to False branch [1]
4 Max 4 marks. Labels must be explicit (T/F or Y/N).
1 (b) 1 mark per point (max 4, 2 marks per benefit):
  • Memory efficiency [1] because local parameters are destroyed when the subprogram ends [1].
  • Prevents accidental modification [1] by other parts of the program which could cause logic errors [1].
  • Makes the code reusable [1] because the subprogram doesn't rely on specific global variable names [1].
4 Must explicitly mention why parameters/local variables are superior to globals.
2 (a) 1 mark per point (max 4):
  • Binary search halves the search space with each comparison [1]
  • Meaning it takes significantly fewer steps to find an item [1]
  • Linear search must check every single item one by one sequentially [1]
  • Therefore Binary search is much faster/more efficient for very large arrays [1]
4
2 (b) 1 mark per point (max 4):
  • Binary search relies on calculating a midpoint and knowing if the target is higher or lower [1]
  • If the data is unsorted, 'higher' or 'lower' gives no indication of where the target is [1]
  • Therefore Binary search cannot mathematically function on unsorted data [1]
  • Linear search does not require sorting as it just checks each item until it finds a match [1]
4
3 (a)
  • Translates high-level code... -> Both [1]
  • Translates and executes... line-by-line -> Interpreter [1]
  • Produces a final executable file... -> Compiler [1]
  • Stops translating... first error is found -> Interpreter [1]
4
June 2026 Practice Paper (Section A Continued)
Question Answer / Indicative Content Mark Guidance
3 (b) 1 mark per point (max 4):
  • A compiler protects the source code [1] so competitors/users cannot copy or steal their intellectual property [1].
  • It creates a standalone executable file [1] so the customer does not need a translator/IDE installed to run the software [1].
  • Compiled code generally executes faster for the end user [1].
4
4 (a) 1 mark per point (max 4):
  • Validation is an automated check by the computer [1] to ensure data is sensible/reasonable/meets certain rules [1].
  • Verification is a check (often by human input) [1] to ensure data has been entered exactly as intended (e.g. double entry) [1].
4 Must contrast the two concepts.
4 (b) 1 mark for method, 1 mark for reason (max 4):
  • Indentation [1] to show the structure of selection blocks/loops [1]
  • Comments [1] to explain the logic of complex sections to other programmers [1]
  • Meaningful variable names [1] so the data purpose is immediately obvious [1]
4 Reject 'makes it easier to read' as TV.
5 (a) Changing the data type [1] of a variable to another data type [1]. 2
5 (b) numValue = int("54") 2 1 mark for `int()`, 1 mark for assignment to `numValue`.
5 (c) print(sensorStatus.left(7)) -> "Warning" [1]
print(sensorStatus.length) -> 14 [1]
print(sensorStatus.substring(8, 6)) -> "Active" [1]
print(sensorStatus.upper) -> "WARNING-ACTIVE" [1]
4 Accept string outputs with or without quote marks.
June 2026 Practice Paper (Section B)
Question Answer / Indicative Content Mark Guidance
6 (a) 1 mark for each correctly drawn shape and 1 for overall logic:
  • OR gate combining inputs A and B [1]
  • NOT gate on input C (must include inversion circle) [1]
  • AND gate combining the outputs of the OR and NOT gates [1]
  • Correct output line P from the AND gate [1]
4 Marks awarded solely on geometric shape. NOT gate without a circle scores 0.
6 (b) Truth table completion:
  • (A OR B) column correct: 0, 0, 1, 1, 1, 1, 1, 1 [2] (1 mark if 1-2 errors)
  • (NOT C) column correct: 1, 0, 1, 0, 1, 0, 1, 0 [2] (1 mark if 1-2 errors)
  • Output P correct based on intermediate columns [2] (1 mark if 1 error)
Correct Output P: 0, 0, 1, 0, 1, 0, 1, 0.
6 Allow follow-through if intermediate columns are wrong but AND logic is correct.
7 (a) 1 mark for Example, 1 mark for Reason:
Normal Data: Any value between 1 and 99 [1] | Reason: It is standard data that should be accepted [1]
Valid Boundary Data: 0 or 100 [1] | Reason: It is on the extreme edge of the accepted range [1]
Invalid Data: -1, 101, or text [1] | Reason: It is outside the acceptable range / wrong data type [1]
6 Do not accept 0 or 100 as Invalid or Normal. They are strictly Valid Boundary.
7 (b) 1 mark per point (max 4):
  • To ensure the program handles unexpected inputs gracefully [1]
  • And does not crash or freeze [1]
  • To verify that the validation loops trigger correctly [1]
  • And output the correct error messages to the user [1]
4
8 1 mark per logical step correctly implemented (max 10):
  • Initialises attempts counter to 0 (or 1) [1]
  • Uses a WHILE loop with correct condition (e.g. attempts < 3) [1]
  • Takes password input() inside the loop [1]
  • Correct IF condition comparing input to "ECO2026" [1]
  • Outputs "Access Granted" if true [1]
  • Forces loop to end if granted (e.g. attempts = 3 or break) [1]
  • ELSE condition if incorrect [1]
  • Outputs "Access Denied" if incorrect [1]
  • Increments attempts = attempts + 1 [1]
  • Checks if locked out (e.g. IF attempts == 3) and outputs "System Locked" [1]
10 There are multiple ways to write this algorithm. Award marks for logical equivalents.
June 2026 Practice Paper (Section B Continued)
Question Answer / Indicative Content Mark Guidance
9 Trace Table Completion:
1 mark per correctly completed row block or specific change:
  • Row 1: batteryLevel=90, hours=1 [2]
  • Row 2: batteryLevel=60, hours=2 [2]
  • Row 3: batteryLevel=50, hours=3 [2]
  • Row 4: batteryLevel=20, hours=4 [2]
  • Row 5: powerSave=True [1]
  • Output: 4 [1]
Example correctly completed table:
batteryLevelpowerSavehoursOutput
100False0
901
602
503
204
True
4
10 Total of 10 marks awarded for the logical flow.
TOTAL MARKS: 80