Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
Tuesday 19 May 2026 – Afternoon
GCSE (9–1) Computer Science
J277/02 Computational thinking, algorithms and programming
Time allowed: 1 hour 30 minutes
Do not use:
* 2 7 0 0 0 1 1 8 5 7 *
• a calculator
* J 2 7 7 0 2 *
Please write clearly in black ink. Do not write in the barcodes.
Centre number Candidate number
First name(s)
Last name
INSTRUCTIONS
• Use black ink.
• Write your answer to each question in the space provided. If you need extra space use
the lined pages at the end of this booklet. The question numbers must be clearly shown.
• Answer all the questions.
INFORMATION
• The total mark for this paper is 80.
• The marks for each question are shown in brackets [ ].
• This document has 20 pages.
ADVICE
• Read each question carefully before you start your answer.
• We advise you to spend approximately 50 minutes on Section A and approximately
40 minutes on Section B.
© Cambridge OCR 2026 [601/8355/X] Cambridge OCR is an exempt Charity
DC (ST/CT) 364929/4 Turn over
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
,Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
2
BLANK PAGE
DO NOT WRITE ON THIS PAGE
© Cambridge OCR 2026
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
, Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
3
Section A
We advise you to spend approximately 50 minutes on Section A.
1
(a) Complete the table to show the output from each algorithm.
Algorithm Output
num = 4
num = num + 2
print(num)
x = 9
x = 2
print(x)
a = 9
b = 8
if a < b then
print(a-1)
else
print(b-1)
endif
score = 1
while score < 50
score = score * 2
endwhile
print(score)
[4]
(b) Tick (✓) one box in each row to identify whether each identifier is valid or not valid for a variable
in a high-level language.
Identifier Valid Not valid
phonenumber
name22
new user
Top_ten
[2]
© Cambridge OCR 2026 Turn over
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
Tuesday 19 May 2026 – Afternoon
GCSE (9–1) Computer Science
J277/02 Computational thinking, algorithms and programming
Time allowed: 1 hour 30 minutes
Do not use:
* 2 7 0 0 0 1 1 8 5 7 *
• a calculator
* J 2 7 7 0 2 *
Please write clearly in black ink. Do not write in the barcodes.
Centre number Candidate number
First name(s)
Last name
INSTRUCTIONS
• Use black ink.
• Write your answer to each question in the space provided. If you need extra space use
the lined pages at the end of this booklet. The question numbers must be clearly shown.
• Answer all the questions.
INFORMATION
• The total mark for this paper is 80.
• The marks for each question are shown in brackets [ ].
• This document has 20 pages.
ADVICE
• Read each question carefully before you start your answer.
• We advise you to spend approximately 50 minutes on Section A and approximately
40 minutes on Section B.
© Cambridge OCR 2026 [601/8355/X] Cambridge OCR is an exempt Charity
DC (ST/CT) 364929/4 Turn over
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
,Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
2
BLANK PAGE
DO NOT WRITE ON THIS PAGE
© Cambridge OCR 2026
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
, Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab
3
Section A
We advise you to spend approximately 50 minutes on Section A.
1
(a) Complete the table to show the output from each algorithm.
Algorithm Output
num = 4
num = num + 2
print(num)
x = 9
x = 2
print(x)
a = 9
b = 8
if a < b then
print(a-1)
else
print(b-1)
endif
score = 1
while score < 50
score = score * 2
endwhile
print(score)
[4]
(b) Tick (✓) one box in each row to identify whether each identifier is valid or not valid for a variable
in a high-level language.
Identifier Valid Not valid
phonenumber
name22
new user
Top_ten
[2]
© Cambridge OCR 2026 Turn over
Check Out ExamLab For More Resources : https://www.stuvia.com/user/examlab