• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 47 páginas
Examen

GCSE (9–1) Computer Science J277/02 Computational thinking, algorithms and programming

Document preview thumbnail
Vista previa 4 fuera de 47 páginas

GCSE (9–1) Computer Science J277/02 Computational thinking, algorithms and programming

Vista previa del contenido

Oxford Cambridge and RSA

Tuesday 21 May 2024 – Afternoon
GCSE (9–1) Computer Science
J277/02 Computational thinking, algorithms and programming
Time allowed: 1 hour 30 minutes

Do not use:
* 1 3 8 0 0 2 8 9 0 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.




© OCR 2024 [601/8355/X] OCR is an exempt Charity
DC (ST) 342920/6 Turn over

, 2
SECTION A

We advise you to spend approximately 50 minutes on Section A.

1 Tick (✓) one box in each row to identify the programming construct where each keyword is used.

Programming construct
Keyword
Selection Iteration
if
for
while
[3]


2 An algorithm decides if a number is odd or even.
An odd number divided by 2 will give the remainder 1.

The flowchart statements have been written for the algorithm, but the flowchart is incomplete.

Complete the flowchart.

Start




INPUT num




if num MOD 2 == 0 OUTPUT "Odd"




OUTPUT "Even"




End


[4]
© OCR 2024

, 3
3
(a) State what is meant by the term syntax error. Give one example of a syntax error in a program.

Definition ..........................................................................................................................................

..........................................................................................................................................................

Example ...........................................................................................................................................

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

(b) A student writes an algorithm to input two numbers and add them together to create a total.

If the total is between 10 and 20 inclusive, "success" is output.

If the total is not between 10 and 20 inclusive, "warning" is output.


01 num1 = input("Enter a number")
02 num2 = input("Enter a number")
03 total = num1 + num1
04 if total >= 10 then
05 print("success")
06 else
07 print("warning")
08 endif


The algorithm does not work correctly.

Identify the line number of the two logic errors in the algorithm and refine the code to correct
each logic error.

Line number .....................................................................................................................................

Correction .........................................................................................................................................

..........................................................................................................................................................

Line number ......................................................................................................................................

Correction .........................................................................................................................................

..........................................................................................................................................................
[4]




© OCR 2024 Turn over

, 4
(c)
(i) Show how a binary search will be used to find the number 10 in the following data set:

1 2 5 6 7 10 20

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

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

(ii) State one pre-requisite for a binary search algorithm.

..........................................................................................................................................................

..................................................................................................................................................... [1]

(iii) Tick (✓) one box to identify the name of the sorting algorithm that splits data into individual items
before recombining in order.

Bubble sort

Insertion sort

Merge sort
[1]

4 A program allows users to search for and watch videos. Users give a rating to the videos they watch.

(a) Identify one input and one output for the program.

Input .................................................................................................................................................

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

(b) Describe one method of defensive design that can be used when creating the program.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................... [2]
© OCR 2024

Información del documento

Subido en
8 de junio de 2026
Número de páginas
47
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$12.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
LECTpharis
4.8
(8)
Vendido
41
Seguidores
1
Artículos
6583
Última venta
4 meses hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes