2025 OCR GCSE (9–1) Computer Science J277/02 Computational thinking, algorithms and progra, Exams of Computer Science

2025 OCR GCSE (9–1) Computer Science J277/02 Computational thinking, algorithms and programming Time allowed: 1 hour 30 minutes (Verified Question Paper With Mark Scheme Combined June 2025) 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. OCR 2025 [601/8355/X] DC (WW/JG) 355817/3 OCR is an exempt Charity Turn over Section A We advise you to spend approximately 50 minutes on Section A.

Typology: Exams

2024/2025

Available from 11/07/2025

TOP-SCORER
TOP-SCORER 🇺🇸

481 documents

1 / 75

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Oxford Cambridge and RSA - 2025
Tuesday 20 May 2025 – Afternoon
GCSE (9–1) Computer Science
J277/02 Computational thinking, algorithms and programming
Time allowed: 1 hour 30 minutes
(Verified Question Paper With Mark
Scheme Combined June 2025)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b

Partial preview of the text

Download 2025 OCR GCSE (9–1) Computer Science J277/02 Computational thinking, algorithms and progra and more Exams Computer Science in PDF only on Docsity!

Oxford Cambridge and RSA - 2025

Tuesday 20 May 2025 – Afternoon

GCSE (9–1) Computer Science

J277/02 Computational thinking, algorithms and programming

Time allowed: 1 hour 30 minutes

(Verified Question Paper With Mark

Scheme Combined June 2025)

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. © OCR 2025 [601/8355/X] DC (WW/JG) 355817/ OCR is an exempt Charity Turn over

© OCR Turn over 2 This flowchart uses iteration. (a) Complete the table by identifying how many times "OK" will be output for when each value is input. Input value Number of times "OK" is output 3 10 [2] (b) Iteration is a programming construct. (i) Identify and describe two different examples of iteration that can be used in a high-level language. 1 .......................................................................................................................................... ............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. 2 .......................................................................................................................................... End

TRUE

IS x < 0?

FALSE

x = x - 2

OUTPUT "OK"

INPUT x Start

© OCR

[4]

© OCR Turn over

(a) Show the steps that a merge sort would take to put the data set into ascending numerical order.

© OCR

[4]

© OCR 4 An algorithm is written to read numbers from the external text file data.txt Each number is checked when it is read from the external text file. The number is output to the user if it is not 0. (a) Complete the algorithm using the OCR Exam Reference Language statements in the box. Not all statements are used. data for if myFile.close() myFile.readLine() input() myFile.writeLine() open print temp txt x myFile =...............................("data.txt") while NOT myFile.endOfFile() temp = ................................................................. if int (.................................................................) != 0 ........................................................(temp) endif endwhile ................................................................. [5] (b) Identify how casting is used in this algorithm. ............................................................................................................................................ .............. .................................................................................................................................. [1]

© OCR Turn over 5 A security system protects online credit card payments. The system has three inputs: Input Description A True when the user enters their correct password B (^) True when the user enters their correct PIN C (^) True when the card is blocked The output (P) is True if both of the following conditions are True:

  • the user has entered either their correct password or has entered their correct PIN
  • the card is not blocked. (a) Draw the logic circuit for the security system A B P C [3] (b) Complete the truth table for P = A AND B A B P [2]

© OCR Turn over (d) As part of the security system, the user is asked to choose a 4-digit value for their PIN. This PIN cannot be 1234 or 4321 Create an algorithm that:

  • takes the PIN as input as a string
  • checks that the PIN is 4 characters in length
  • checks that the PIN is not either “1234” or “4321”
  • outputs "VALID PIN" if the PIN meets all of the criteria
  • outputs "INVALID PIN" if the PIN does not meet all of the criteria. You do not need to check that the digits entered are numeric. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ ..............

© OCR

.................................................................................................................................. [6]

© OCR

.................................................................................................................................. [3]

© OCR Turn over (b) The database table TblMusic stores data about the music acts. Some of the data in TblMusic is shown: ActID Stage Day SetLength 1 Platinum Saturday 0. 2 Hills Saturday 1. 3 Triangle Sunday 1. 4 Platinum Sunday 0. An SQL statement has been written to show ActID and Stage for all acts playing on Saturday. The SQL statement is incorrect. SELECT ActID AND Stage FROM TblActs IF Day = Saturday (i) Refine the SQL statement to correct the errors. ............................................................................................................................................ .............. ............................................................................................................................................ .............. ............................................................................................................................................ .............. .................................................................................................................................. [4] (ii) Identify one example of a record from TblMusic ............................................................................................................................................ .............. .................................................................................................................................. [1] (iii) Give the most appropriate data type for each field shown. Field name Data stored Data type Stage (^) The name of the stage SetLength (^) The length of each set in hours [2]

© OCR Turn over

.................................................................................................................................. [2]

© OCR (d) The number of different music acts on each of the three stages is stored in the array actNumbers. Each index of the array represents one stage. Index 0 1 2 Data actNumbers This algorithm adds up the total number of acts on all three stages. 01 count = 0 02 for x = 0 to 2 03 count = count + actNumbers[x] 04 next x 05 print(count) (i) Complete the trace table for the algorithm. You may not need to use all rows in the table. Line number count^ x^ Output