0% found this document useful (0 votes)
14 views77 pages

Cores CISC and Methodologies

The document is an examination paper for Computer Science (H046, H446) that includes various programming tasks, pseudocode algorithms, and questions about programming concepts such as variables, parameters, and sorting algorithms. It provides instructions for candidates on how to complete the exam, including materials needed and guidelines for written communication. The paper consists of multiple sections with questions requiring explanations, comparisons, and code corrections related to programming logic and structures.

Uploaded by

munira.warsame2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views77 pages

Cores CISC and Methodologies

The document is an examination paper for Computer Science (H046, H446) that includes various programming tasks, pseudocode algorithms, and questions about programming concepts such as variables, parameters, and sorting algorithms. It provides instructions for candidates on how to complete the exam, including materials needed and guidelines for written communication. The paper consists of multiple sections with questions requiring explanations, comparisons, and code corrections related to programming logic and structures.

Uploaded by

munira.warsame2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Computer Science (H046, H446)

Cores, CISC and Methodologies


Nader Yazdi
Please note that you may see slight differences between
this paper and the original.
Duration: Not set
Candidates answer on the Question paper.

OCR supplied materials:


Additional resources may be supplied with this paper.

Other materials required:


• Pencil
• Ruler (cm/mm)

INSTRUCTIONS TO CANDIDATES
• Write your name, centre number and candidate number in the boxes above. Please write clearly and in capital letters.
• Use black ink. HB pencil may be used for graphs and diagrams only.
• Answer all the questions, unless your teacher tells you otherwise.
• Read each question carefully. Make sure you know what you have to do before starting your answer.
• Where space is provided below the question, please write your answer there.
• You may use additional paper, or a specific Answer sheet if one is provided, but you must clearly show your candidate
number, centre number and question number(s).

INFORMATION FOR CANDIDATES


• The quality of written communication is assessed in questions marked with either a pencil or an asterisk. In History and
Geography a Quality of extended response question is marked with an asterisk, while a pencil is used for questions in
which Spelling, punctuation and grammar and the use of specialist terminology is assessed.
• The number of marks is given in brackets [ ] at the end of each question or part question.
• The total number of marks for this paper is 195.
• The total number of marks may take into account some 'either/or' question choices.

© OCR 2025. You may photocopy this page. 1 of 77 Created in ExamBuilder


1 A student has written this pseudocode algorithm:
01 a = 12
02 do
03 b = input("Enter a number")
04 until b >= 0 and b <= 100
05 for c = 1 to a
06 print(c * a)
07 next c

The program uses variables.

(i) Describe what is meant by a variable.

[2]

(ii) Give the identifiers of all the variables used in this program.
[1]

© OCR 2025. You may photocopy this page. 2 of 77 Created in ExamBuilder


2 A text-based computer game allows a user to dig for treasure on an island. The island is designed as
a grid with 10 rows and 20 columns to store the treasure. Each square is given an x and y coordinate.
Some of the squares in the grid store the name of a treasure object. Each treasure object has a value,
e.g. 100 and a level, e.g. "Bronze."

The main program initialises a new instance of Board. The programmer is considering declaring this as
a global variable or as a local variable and then passing this into the subroutines that control the
game.

Compare the use of variables and parameters in this game.

You should include the following in your answer:

• what is meant by a local variable and global variable


• how local and global variables can be used in this program
• the use of passing parameters by value and by reference.

© OCR 2025. You may photocopy this page. 3 of 77 Created in ExamBuilder


[9]

3(a) Layla writes a pseudocode algorithm to:

• input 20 positive numbers into a 0-indexed 1-dimensional array


• output the average (mean) number as a decimal
• output the smallest number
• output the largest number.

The pseudocode algorithm is shown. It contains various errors.

01 total = 1
02 smallest = 9999
03 largest = -1
04 for x = 0 to 21
05 dataArray[x] = input("Enter a number")
06 total = total + dataArray[x]
07 if dataArray[x] < largest then
08 largest = dataArray[x]
09 endif
10 if dataArray[x] < smallest then
11 smallest = dataArray[x]
12 endif
13 next x

© OCR 2025. You may photocopy this page. 4 of 77 Created in ExamBuilder


14 print("Average = " + total * 20)
15 print("Smallest = " + smallest)
16 print("Largest = " + largest)

dataArray is defined as a local variable within the main program.

(i) State what is meant by a ‘local variable’.

[1]

(ii) Give one benefit and one drawback of declaring dataArray as a local variable in the main
program.

Benefit

Drawback

[2]

(b) Identify two variables used in this algorithm.

2 [2]

© OCR 2025. You may photocopy this page. 5 of 77 Created in ExamBuilder


4 A programmer has partially developed a bubble sort algorithm in pseudocode.

This will partially sort an array of numbers called numbers that is passed as a parameter.

01 procedure bubbleSort(numbers : byRef)


02 flag = true
03 for x = 0 to numbers.length – 1
04 if numbers[x] > numbers[x + 1] then
05 holdValue = numbers[x]
06 numbers[x] = numbers[x + 1]
07 numbers[x + 1] = holdValue
08 flag = false
09 endif
10 next x
11 endprocedure

(i) Explain why the procedure bubbleSort accepts the array numbers by reference and not by
value.

[3]

(ii) The programmer has used a for loop on line 3 in the procedure bubbleSort. A for loop is a
count controlled loop.

State what is meant by the term ‘count controlled loop’.

[1]

© OCR 2025. You may photocopy this page. 6 of 77 Created in ExamBuilder


(iii) State the purpose of the variable holdValue in the procedure bubbleSort.

[3]

(iv) The procedure bubbleSort will only partially sort the array numbers into order.

Describe what the programmer would need to add to the algorithm to enable it to fully sort the
numbers into order.

[2]

5 A bubble sort will sort an array of 50 integer values called numberArray.

State why the integer values are stored in an array instead of separate variables.

[1]

© OCR 2025. You may photocopy this page. 7 of 77 Created in ExamBuilder


6 The array words is defined as a global variable and contains these values:

"house" "boat" "car" "telephone" "garden" "spice" "elephant"

The pseudocode function useWords() here uses the global array words. The number of words in the
array words is passed as a parameter.

function useWords(numberOfWords : byVal)


contents = ""
for count = 0 to numberOfWords - 1
contents = contents + words[count] + " "
next count
return contents
endfunction

(i) Identify two variables in the function useWords().

[2]

(ii) numberOfWords is a parameter passed by value.

Describe the difference between passing a parameter by value and by reference.

[2]

(iii) Rewrite the function useWords() to use a while loop instead of a for loop.

The function header and close have been written for you.

Write your answer using pseudocode or program code.

© OCR 2025. You may photocopy this page. 8 of 77 Created in ExamBuilder


function useWords(numberOfWords : byVal)

endfunction
[4]

7 Kylie buys used games consoles and then sells them to make a profit. She sells her products in
multiples of £5 such as £30, £55 and £95. Kylie only accepts £50, £20, £10 and £5 notes from her
customers.

Kylie has written an algorithm which will calculate the amount of change needed by stating how many
£20, £10 and £5 notes are needed.

The program should output the minimum number of notes required. For example if £35 change is
required then it should output 1 x £20 and 1 x £10 and 1 x £5.

01 total = input("Enter total price of goods")


02 paid = input("Enter amount paid")
03 global change = paid – total
04 calculateChange()
05
06 procedure calculateChange()
07 twenty = 0
08 ten = 0
09 five = 0
10 while change >= 20 //Calculates number of £20 notes needed
11 twenty = twenty + 1

© OCR 2025. You may photocopy this page. 9 of 77 Created in ExamBuilder


12 change = change – 20
13 endwhile
14 while change >= 10 //Calculates number of £10 notes needed
15 ten = ten + 1
16 change = change – 10
17 endwhile
18 while change >= 5 //Calculates number of £5 notes needed
19 five = five + 1
20 change = change – 5
21 endwhile
22 print("The amount of change you need is £" + str(change))
23 print("Total £20 Notes:" + str(twenty))
24 print("Total £10 Notes:" + str(ten))
25 print("Total £5 Notes:" + str(five))
26 endprocedure

Describe how calculateChange() on line 04 is used differently to calculateChange() on line


06.

[2]

© OCR 2025. You may photocopy this page. 10 of 77 Created in ExamBuilder


8 For each statement shown in Table 5, tick (✓) one box in each row to indicate which stage of
compilation each action takes place at.

Lexical Syntax Code


analysis analysis generation
Comments and whitespace are
removed
Keywords are replaced with tokens

Object code is created

Symbol table created for variables

Builds an abstract syntax tree

Table 5
[5]

9 Trudi has written a procedure, bubbleSort.

01 procedure bubbleSort(numbers)
02 do
03 sorted = true
04 for count = 0 to numbers.length -2
05 if numbers[count] > numbers[count+1] then
06 temp = numbers[count+1]
07 numbers[count+1] = numbers[count]
08 numbers[count] = temp
09 sorted = false
10 endif
11 next count
12 until sorted == true
13 endprocedure

(i) Identify a line in the procedure bubbleSort where a decision is taken.

© OCR 2025. You may photocopy this page. 11 of 77 Created in ExamBuilder


[1]

(ii) Identify the name of the parameter used in the procedure bubbleSort.

[1]

(iii) Describe the purpose of the temp variable in the procedure bubbleSort.

[2]

(iv) Describe the purpose of the sorted variable in the procedure bubbleSort.

[2]

© OCR 2025. You may photocopy this page. 12 of 77 Created in ExamBuilder


10(a A Nonogram is a logic puzzle where a player needs to colour in boxes. The puzzle is laid out as a grid
) and each square needs to be either coloured black or left white.

The numbers at the side of each row and column tells the player how many of the boxes are coloured
in consecutively. Where a row has two or more numbers, there must be a white square between the
coloured squares.

In this example:

• the first column has 1 1, this means there must be two single coloured boxes in this column.
There must be at least 1 white box between them.
• the first row has 2, this means there must be two consecutively coloured boxes in the row.

Juan is creating a program that will store a series of Nonograms for a user to play. The game will
randomly select a puzzle and display the blank grid with the numbers for each row and column to the
user.

The user plays the game by selecting a box to change its colour. If the box is white it will change to
black and if it is black it will change to white. The user can choose to check the answer at any point,
and the game will compare the grid to the answers and tell the user if they have got it correct or not.

Juan is creating a structure diagram to design the game.

(i) Complete the structure diagram by adding another layer for New game, Play game and Check
answer.

© OCR 2025. You may photocopy this page. 13 of 77 Created in ExamBuilder


[3]

(ii) A structure diagram is one method of showing the decomposition of a problem.

Explain why decomposing a problem can help a developer design a solution.

[2]

(iii) Identify one input, one process and one output required for the game.

Input

Process

Output

[3]

© OCR 2025. You may photocopy this page. 14 of 77 Created in ExamBuilder


(b) Juan uses the structure diagram to create a modular program with a number of subroutines.
The program will use two integer 2-dimensional arrays to store the puzzles:

• puzzle(5,5) stores the solution


• answerGrid(5,5) stores the user’s current grid.

A 0 represents a white box and a 1 represents a black box.

(i) Juan creates a function, countRow(), to count the number of coloured boxes in one row and
return the number of consecutive coloured boxes in that row. If there is more than one set of
coloured boxes in the row, these are joined together and the string is returned. For example, in the
following grid countRow for row 0 will return "2" as a string, and countRow for row 2 will return "1
1" as a string. If there are no 1s in a row, then "0" is returned as a string.

Complete the pseudocode algorithm countRow().

01 function countRow(puzzle:byref, rowNum:byval)


02 count = 0
03 output = " "
04 for i = 0 to ……………………………………………
05 if puzzle[rowNum, i] == …………………………………………… then
06 count = count + 1
07 elseif count >= 1 then
08 output = output + str(……………………………………………) + " "
09 count = 0
10 endif
11 next i
12 if count>= 1 then
13 output=output+str(count)
14 elseif output == "" then
15 output = "……………………………………………"
16 endif
17 return ……………………………………………
18 endfunction
[5]

© OCR 2025. You may photocopy this page. 15 of 77 Created in ExamBuilder


(ii) Explain the purpose of line 03 in the function countRow.

[2]

(iii) Describe the purpose of branching and iteration in the function countRow.

[3]

(iv) The procedure displayRowAnswer() takes puzzle as a parameter and outputs the value in
each box. Each box in a row is separated by a space. At the end of each row there are two spaces
and (by calling the function countRow from part (i)) the clue values for that row.

For example the puzzle below:

Would output:

© OCR 2025. You may photocopy this page. 16 of 77 Created in ExamBuilder


Write pseudocode or program code for the procedure displayRowAnswer().

[6]

(v) The function checkWon() takes answerGrid and puzzle as parameters and compares each
element in the grids. If they are identical, it returns true, otherwise returns false.

01 function checkWon(puzzle)
02 for row = 0 to 4
03 for column = 0 to 4
04 if puzzle[row, column] == answerGrid[row, column] then
05 return false
06 endif
07 next column
08 next column

© OCR 2025. You may photocopy this page. 17 of 77 Created in ExamBuilder


09 return true
10 endfunction

There are three logic errors in the function checkWon

State the line number of each error and give the corrected line.

Error 1 line number

Error 1 correction

Error 2 line number

Error 2 correction

Error 3 line number

Error 3 correction

[3]
(c) * Juan passed the two arrays as parameters, but he did consider making them globally accessible.

Compare the use of global and local variables and data structures in this program. Include the use of
parameters and program efficiency in your answer.

© OCR 2025. You may photocopy this page. 18 of 77 Created in ExamBuilder


[9]

© OCR 2025. You may photocopy this page. 19 of 77 Created in ExamBuilder


(d) Juan wants to create a program that will generate new Nonograms with different grid sizes. For
example a Nonogram with a 10 × 10 grid or a 5 × 20 grid.

Describe how the program could be written to automatically generate a new Nonogram.

[4]

11(a A printer buffer is a storage area that holds the data, known as jobs, that are to be printed by a printer.
)
A simulation of the printer buffer uses a queue data structure to store jobs that are waiting to be
printed. The queue is not circular.

The printer buffer is represented as a zero-indexed 1D array with the identifier buffer.

Fig. 2 shows the current contents of the queue buffer and its pointers.

© OCR 2025. You may photocopy this page. 20 of 77 Created in ExamBuilder


Fig. 2

State the purpose of the pointers queueHead and queueTail.

queueHead

queueTail

[2]

© OCR 2025. You may photocopy this page. 21 of 77 Created in ExamBuilder


(b) The function dequeue outputs and removes the next data item in the queue.

The procedure enqueue adds the job passed as a parameter to the queue.

Show the final contents of the queue and pointer values after the following instructions have been run
on the queue buffer shown in Fig. 2.

dequeue()

dequeue()

enqueue(job-128)

dequeue()

enqueue(job-129)

[5]

© OCR 2025. You may photocopy this page. 22 of 77 Created in ExamBuilder


(c) The array, buffer and pointer values are declared with global scope.

(i) The function dequeue returns null if the array is empty, and the contents of the next element if
not empty. The queue is not circular.

Write an algorithm, using pseudocode or program code, for the function dequeue().

[5]

(ii) The function enqueue returns -1 if there is no space at the end of the queue to add data, and
returns 1 if the parameter was added to buffer. The array buffer contains a maximum of 100
elements.

Write an algorithm, using pseudocode or program code, for the function enqueue().

© OCR 2025. You may photocopy this page. 23 of 77 Created in ExamBuilder


[6]

(iii) In the main program of the simulation the user is asked whether they want to add an item to the
queue or remove an item.

If they choose to add an item they have to input the job name, and the function enqueue is called.

If they choose to remove an item, the function dequeue is called and the job name is output.

Appropriate messages are output if either action cannot be run because the queue is either empty
or full.

Write, using pseudocode or program code, an algorithm for the main program of the simulation.

© OCR 2025. You may photocopy this page. 24 of 77 Created in ExamBuilder


[8]

© OCR 2025. You may photocopy this page. 25 of 77 Created in ExamBuilder


(d) The queue is changed to make it a circular queue.

Describe how the functions enqueue and dequeue will need to be changed to allow buffer to work
as a circular queue.

[3]

(e) Some print jobs can have different priorities. The higher the priority the sooner the job needs to be
printed.

Describe how the program could be changed to deal with different priorities.

[3]

© OCR 2025. You may photocopy this page. 26 of 77 Created in ExamBuilder


12 A theatre has a website showing its productions and allowing people to make bookings.

Part of the site is shown below. The words ‘Book tickets’ link to the page ‘bookings.html’.

Upcoming productions:
1. Macbeth
2. Blood Brothers
3. An Inspector Calls

Book tickets

The theatre offers price reductions on Tuesdays and Wednesdays.

The theatre manager wants some text on the website to display “Midweek Special – tickets £15
tonight” on Tuesdays and Wednesdays, and “Tickets £20 tonight” on all other nights.

The website coders will use a div tag with the id ‘prices’ to do this. The Javascript code to change
the contents of the div tag has been started below. The variable dayCode holds a number
representing the current day of the week (0 for Sunday, 1 for Monday, 2 for Tuesday and so on).

Complete the Javascript code below so the correct message is displayed in a div tag with the id
‘prices’.

var date = new Date();


var dayCode = date.getDay();
//0 is Sunday, 1 Monday, 2 Tuesday etc
var priceText="";

= priceText;
[4]

© OCR 2025. You may photocopy this page. 27 of 77 Created in ExamBuilder


13 OCRSystems are considering using parallel processing in a computer system that will be used for
video rendering.

Describe how parallel processing would increase the performance of this computer system.

[3]

14(a Beryl has to write a program that explains patterns in crystals, using the following information.
)
All the patterns in crystals have two lengths, x and y, and an angle A.

If A is 90° you need to check the lengths.


If the lengths are equal it is a square crystal.
If the lengths are not equal it is a rectangular crystal.
If A is not 90° it may be a hexagonal crystal. These crystals have angles of 60° and 120° and the
lengths are always equal.
If A is not 60° or 90° or 120° it must be a parallelogram crystal if the lengths are not equal, or a
rhombic crystal if the lengths are equal.

© OCR 2025. You may photocopy this page. 28 of 77 Created in ExamBuilder


Here are the first few lines of code Beryl produces.

© OCR 2025. You may photocopy this page. 29 of 77 Created in ExamBuilder


An end-user will measure crystals and enter the measurements into the program. The code should
allow for small errors in measurements.

(i) Rewrite the IF statement in line 05 so that it allows for an error of up to 2° in the measurement of A.

[2]

(ii) Rewrite the IF statement in line 06 so that the condition is true if the difference between x and y is
less than 10% of the length of x.

[4]

(b) Beryl's flow chart contains variables.

(i) What is meant by a variable?

[2]

(ii) List the variables in Beryl's flow chart.

[1]

© OCR 2025. You may photocopy this page. 30 of 77 Created in ExamBuilder


15 OCRSystems are designing a new CPU for a computer system that will be used for video rendering.
Part of the video rendering process is when the video is exported. This is when the computer
combines all of the separate video elements together to form the final video.

An important design consideration is whether OCRSystems use a CISC processor type or a RISC
processor type.

Describe one difference between a CISC processor and a RISC processor.

[2]

16 CPUs can be designed to take a Complex Instruction Set Computer (CISC) or a Reduced Instruction
Set Computer (RISC) approach.

Describe one difference between CISC and RISC.

[2]

© OCR 2025. You may photocopy this page. 31 of 77 Created in ExamBuilder


17 The company sets up a website to promote OCR smart watch. Part of the website is shown below.
The sentence ‘Download The Factsheet’ is a hyperlink to the file factsheet.pdf which is stored in the
same folder as the HTML file for the webpage.

Features
The new OCR Smart Watch:
1. Uses the CB2 RISC processor for long battery life
2. Stores up to 20hrs of music
3. Tracks fitness
Download The Factsheet

(i) Write the HTML to produce the extract from the webpage above. You can assume it will be placed
within the <body> tags of a pre-existing page. You do not need to specify the font.

[5]

(ii) Explain what happens when a search engine indexes the page. You do not need to discuss
ranking.

© OCR 2025. You may photocopy this page. 32 of 77 Created in ExamBuilder


[3]

(iii) Explain why using a RISC processor rather than a CISC processor is likely to result in increased
battery life.

[3]

© OCR 2025. You may photocopy this page. 33 of 77 Created in ExamBuilder


18 A company produces digital photo frames (i.e. photo frames that display digital photographs).

The photo frame has a RISC processor.

Describe one advantage to the company of using a RISC processor, rather than a CISC processor.

[2]

19 Charlie is developing a computer game using a development lifecycle.

Complete the table by describing each method of software development.

Method Description
Extreme programming ........................................................................................
........................................................................................
........................................................................................
Waterfall lifecycle ........................................................................................
........................................................................................
........................................................................................
Spiral model ........................................................................................
........................................................................................
........................................................................................
[6]

20 Taylor is designing a program for a client who would like to simulate earthquakes on major cities
around the world in 3D. The client would like to be able to view any stage of an earthquake such as:

1. the build-up of the earthquake


2. the earthquake taking place
3. the aftershocks of the earthquake.
The client would also like to be able to play the simulation at different speeds. For example, a slow,
normal or fast speed.

Taylor is deciding which software development methodology to use to write the program. The client

© OCR 2025. You may photocopy this page. 34 of 77 Created in ExamBuilder


has stated that they would like the program as soon as possible and want to be heavily involved during
the program creation.

(i) Describe the difference between the spiral model and the waterfall model.

[4]

(ii) Give two reasons why the waterfall model is not suitable for Taylor.

[2]

(iii) Name and describe one other model of software development.

Name

Description

[2]

© OCR 2025. You may photocopy this page. 35 of 77 Created in ExamBuilder


21 A company makes anti-virus software.

Anti-virus software is an example of a utility.

In order to keep up to date with the latest virus threats, the company is continually updating their
software.

The programmers use an Extreme Programming approach when developing the updates.

Explain what is meant by Extreme Programming and why it is a suitable approach in this case.

[4]

22
A procedure takes as input a number between 1 and 100. It calculates and outputs the square of each
number starting from 1, to the number input. The square of a number is the result of multiplying a
number by itself.

The procedure needs to be tested.

© OCR 2025. You may photocopy this page. 36 of 77 Created in ExamBuilder


(i) Describe how black box testing can be used to test a program.

[3]

(ii) For each type of test given in the table, identify two examples of test data that can be used to test
the program.

Test Type Test Data 1 Test Data 2


Normal
Extreme
Invalid

[3]

© OCR 2025. You may photocopy this page. 37 of 77 Created in ExamBuilder


23 A software development company is building an operating system for a mobile phone that is in the
process of being designed.

The developers follow the waterfall lifecycle.

(i) List three stages of the waterfall lifecycle.

3 [3]

(ii) Justify why the waterfall lifecycle is suited to the development of the operating system.

[2]

(iii) Give one disadvantage of using the waterfall lifecycle to develop the operating system.

[1]

© OCR 2025. You may photocopy this page. 38 of 77 Created in ExamBuilder


24 A software company decides to release a duplicate file finder which it has named “De-Duplicator”.
Duplicate files are files that are exactly the same (bit for bit identical). Space is often wasted on
computers by having multiple versions of the same file. Duplicate file finders are programs that find
and identify duplicate files on a hard drive so that they can be removed.

* The software team that produces De-Duplicator decides to make a new version that can detect
duplicated images the previous version could not. The software team must decide which methodology
they will use for the project. Some members of the team suggest extreme programming whilst others
would prefer to use the waterfall lifecycle.

Discuss the two methodologies and justify which you would recommend.

[12]

END OF QUESTION PAPER

© OCR 2025. You may photocopy this page. 39 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

1 i 1 mark each 2 Element/identifier on its own is not


enough for BP1
A memory location // named
storage location Examiner’s Comments
Stores/holds data / a value
That can be changed Most candidates gained some credit
for identifying that a variable holds a
value, and this was the most popular
response. Element/identifier on its own
was insufficient for the first mark point
as there had to be a clear indication
that the identifier referred to a
memory/storage location.

ii 1 mark for all variables: 1 Must have all three for the mark to be
abc awarded.

Examiner’s Comments

The majority of candidates had little


difficulty correctly identifying the
variables given in the code.

Total 3

2 Mark Band 3 – High level 9 AO1: Knowledge and Understanding


(7–9 marks) Indicative content
The candidate demonstrates a
thorough knowledge and Local variable can only be
understanding of parameters and accessed within sub-program/main
local/global variables; the material is program it is declared within
generally accurate and detailed. Global variable can be accessed by
The candidate is able to apply their all sub-programs
knowledge and understanding directly Parameters are items passed to a
and consistently to the context subproblem
provided. Evidence/examples will be Passing by reference sends a
explicitly relevant to the explanation. pointer to the original value, so this
There is a well-developed line of will be changed when control is
reasoning which is clear and logically returned
structured. The information presented Passing by value sends the a copy
is relevant and substantiated. of the value, so the original will not
be changed when control is
Mark Band 2 – Mid level returned
(4–6 marks)
The candidate demonstrates AO2: Application
reasonable knowledge and

© OCR 2025. You may photocopy this page. 40 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance


understanding of parameters and If board is local it can only be
local/global variables; the material is accessed in the main program
generally accurate but at times This will need to be passed to any
underdeveloped. sub-programs that need to use it
The candidate is able to apply their If the board needs to be changed it
knowledge and understanding directly will need passing by reference, so
to the context provided although one or that the board is updated
two opportunities are missed. If it only needs to be accessed and
Evidence/examples are for the most not changed it can be passed by
part implicitly relevant to the value
explanation.
The candidate provides a reasonable AO3: Evaluation
discussion, the majority of which is
focused. Evaluative comments are, for If global then this would be present
the most part appropriate, although in memory throughout hence using
one or two opportunities for more memory
development are missed. …however the board will be
There is a line of reasoning presented required throughout the program so
with some structure. The information may be as efficient as passing it
presented is in the most part relevant through parameters
and supported by some evidence. …if global then the programming
may be more straight forward, and
Mark Band 1 – Low Level less likely to have errors with
(1–3 marks) passing the board incorrectly to
The candidate demonstrates a basic subprograms, i.e. it may not be
knowledge of parameters and updated when it needs to be
local/global variables with limited Using local means that the board
understanding shown; the material is can be manipulated by
basic and contains some inaccuracies. subprograms without affecting the
The candidates makes a limited actual board if needed, for example
attempt to apply acquired knowledge to simulate potential changes.
and understanding to the context
provided. Examiner’s Comments
The candidate provides a limited
discussion which is narrow in focus. A good range of Level 2 responses
Judgements if made are weak and were observed with competent
unsubstantiated. descriptive definitions of local versus
The information is basic and global and byVal/byRef parameter
comunicated in an unstructured way. passing.
The information is supported by limited
evidence and the relationship to the There were far fewer high level AO3
evidence may not be clear. evaluations of relative memory use
within the context of the scenario when
0 mark passing byVal/byRef for a relatively
No attempt to answer the question or large grid object. Good, contextualised

© OCR 2025. You may photocopy this page. 41 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance


response is not worthy of credit. responses took the elements of the
scenario in section B of the paper and
talked about the grid object and
passing parameters like x and y
coordinates. Responses such as this
were relatively rare.

Assessment for learning

Candidates would benefit from


producing solutions centred around the
scenario presented in Section B of the
paper. Having extensive OOP
programming experience in a relevant
high level language will help
candidates to successfully tackle
questions where algorithms have to be
presented. Sample Python code based
on Section B is presented below for
consideration.

Assessment for learning

# 2023 Section B

class Treasure:

def __init__(self, pValue: int,


pLevel: str):
self.__value = pValue
self.__level = pLevel

def getValue(self):
return self.__value

def setValue(self,pValue: int):


return self.__pValue

def getLevel(self):
return self.__level

def setLevel(self,pLevel: str):


return self.__pLevel

© OCR 2025. You may photocopy this page. 42 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

class Board():

def __init__(self):
self.__grid = [[Treasure(-1,"") for
_ in range(20)] for _ in range(10)]

def getGridItem(self,x: int, y: int):


return self.__grid[x][y]

def setGridItem(self,x: int,y: int,


pTreasure: Treasure):
self.__grid[x][y] = pTreasure
def guessGrid(b: Board):
row = int(input("Row: "))
col = int(input("Col: "))
t = b.getGridItem(row, col)
if t.getLevel() == "":
print("No treasure")
else:
print(f"Treasure found at {row}
{col}!")
print(f"Level {t.getLevel()} Value
{t.getValue()}")

# Test code - Treasure @ 2,2 all other


locations no treasure
island = Board()
prize = Treasure(5,"Prize!")
island.setGridItem(2,2,prize)
guessGrid(island)

Total 9

© OCR 2025. You may photocopy this page. 43 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

3 a i it can only be accessed within the 1 Examiner’s Comments


subroutine//block in which it is
declared Few candidates were able to clearly
define the term 'local variable'. The
concept of scope of variable s
appeared to be poorly understood, with
few able to define that a local
variable’s scope was that of the
function/procedure in which it was
declared.

ii 1 mark for benefit 2 Examiner’s Comments


e.g.
Some candidates confused the terms
Increases data integrity local variable and global variable and
More efficient memory usage gave de finitions the wrong way round.
Stops other subroutines accidently A significant number of responses
altering variable demonstrated conceptual
misconceptions. The contents of
1 mark for drawback dataArray could be used in other parts
e.g. of the program if it was passed as a
parameter to a function/procedure, but
Cannot be accessed directly by could not be referenced directly.
other subroutines Responses such as giving ‘can’t be
It has to be passed into a used anywhere else in the program’ as
subroutine as a parameter a disadvantage were, therefore,
incorrect.

b 1 mark each to max 2 2 Examiner’s Comments

total Most candidates correctly identified two


smallest variables from the given code.
largest
x
dataArray

Total 5

© OCR 2025. You may photocopy this page. 44 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

4 i 1 mark per bullet 3 Examiner’s Comments

by reference will reorder the Many candidates struggled to go


contents of the array beyond recall of definitions for calling
…so the new order can be by reference and calling by value and
accessed by the main program // so struggled to apply it to the code given
will be saved when the procedure and to provide a detailed explanation.
ends
by value will change the array only The bubble sort was defined as a
in this procedure procedure and not a function, so if
… and so would need to return the numbers had been passed by value, a
array. copy of the array would have been
passed, and any changes made would
not have been kept after the procedure
had completed execution.

ii A loop that repeats a fixed / set 1 Examiner’s Comments


number of times
Most candidates could accurately
define a ‘count controlled loop’ as one
that repeated a predefined number of
times, although some candidates gave
an ambiguous response that was
equally applicable to a conditional loop.

© OCR 2025. You may photocopy this page. 45 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii To temporarily hold a value (for 3 Examiner’s Comments


numbers[x])…
…while it is being transferred from Many candidates found it difficult to
one position to another… explain the purpose of the holdValue
….in the array numbers variable in context. Where candidates
To stop values over writing each achieved some of the marks, they most
other frequently identified holdValue as a
temporary store that was required to
prevent accidental overwriting of data
during the swap process. Relatively
few were able to accurately describe
how the variable allowed the contents
of dataArray[x] and dataArray[x+1] to
be swapped.

Exemplar 1

This exemplar very clearly states


exactly how and why the variable
holdValue is required.

iv Add a (second outer) loop 2 Examiner’s Comments


That will repeat for each pass //
repeat until the flag is set to true at Many candidates found it challenging
the end of a pass to apply knowledge of a bubble sort to
the code given. While a pleasing
number identified the need to have an
outer loop, there were far fewer who
were able to expand on this to explain
that this was required to repeat the
process for the requi red number of
passes, or until no swaps had occurred
during a pass.

Total 9

© OCR 2025. You may photocopy this page. 46 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

5 1 mark for: 1 Examiner’s Comments

Can refer to all 50 only using one The concept of having a single
identifier // all values can be indexable identifier seemed to be
indexed in one array poorly understood with few candidates
The numbers can be passed as a gaining the mark. While many
single parameter candidates understood that an array
Does not need 50 variables to be can be iterated through, they did not
declared/passed link this to the fact that elements in an
array are indexable. Similarly,
unqualified points such as ‘an array is
easier to sort’ were not given marks for
the same reason.

There was a common misconception


that an array would use far less
memory space than 50 separate
variables. There would be minimal
difference since each separate value
would take the same amount of
storage space as the corresponding
value in an array. The only overhead
for separate variables would be the
extra pointers to the memory locations
for each, compared to one pointer for
an array.

Total 1

© OCR 2025. You may photocopy this page. 47 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

6 i 1 mark for each variable 2 Accept exact spelling only

contents Do not award numberOfWords if there


count are obvious spaces in ‘number of
numberOfWords Words’. It must be a valid identifier.
words / words[]
Examiner’s Comments

The majority of candidates answered


correctly, with the most popular
answers being count and contents.
A few candidates incorrectly gave data
values from the array rather than
identifying variables in the function.

ii 1 mark per bullet 2 Must cover byVal and byRef for 2


marks to be awarded.
By reference the function receives
the memory location of the data Must be clear that byVal is a copy of
By value the function receives a the original value.
copy of the variable
Examiner’s Comments
By reference will make changes to
the original variable It was pleasing to see an improvement
By value will make changes to the in responses to this topic this session.
copy of the variable There were still some answers that
were too vague that did not specify that
By reference will overwrite data in by value uses a copy of the parameter
the original variable and that by reference passes the
By value will not overwrite the data memory address. Other examples of
in the original variable vagueness that were not given marks
included answers such as ‘by value
By reference will keep the changes can’t change the value while by
after the function ends reference can’ that did not qualify the
By value will not keep the changes scope within which changes can be
after the function ends made. A variable passed by value can
clearly be changed in a function, but it
is the local copy that is changed and
then disregarded when the function
finishes.

© OCR 2025. You may photocopy this page. 48 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii 1 mark per bullet 4 Accept:


while count <= numberOfWords - 1
initialising a counter
looping between 0 and Accept other combinations for example
numberOfWords -1 counting from 1 and then subtracting 1
incrementing counter inside loop for the array element (but do not credit
remainder of algorithm correct off by one errors)
(initialisation, concatenation and
return) Accept:
len(words) for numberOfWords
e.g.
contents = "" Examiner’s Comments
count = 0
while count < numberOfWords Many candidates struggled with this
contents = contents + question. Some candidates rewrote the
words[count] + " " for loop putting the word while in
count = count + 1 place of for showing little
endwhile understanding of the difference
return contents between a counter-controlled and a
conditional loop.

Common errors included not initialising


the count variable before using it
within the body of the while loop, off-by-
one errors, and forgetting to increment
the count variable within the loop.
Poor indentation was often a problem,
and a number of candidates
erroneously placed the return
statement inside the body of the loop.

Off-by-One errors
There were many off-by-one errors
observed, e.g. while count <=
numberOfWords rather than while
count < numberOfWords.

Candidates need to give code that is


logically accurate, and, in this instance,
it required the loop to run the correct
number of times so that all the words in
the array were processed.

Total 8

© OCR 2025. You may photocopy this page. 49 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

7 1 mark per bullet up to a maximum of 2 2 Examiner’s Comments


marks, e.g.: (AO3.3) Many candidates responded correctly
(2) and could identify the difference
Line 04 is calling the procedure between a procedure call and a
Line 06 is defining the procedure procedure declaration.

Total 2

8 Lexical Syntax Code 5 One mark per row. No mark if more


analysi analysi generatio than one/no box is ticked.
s s n
Accept other marks that clearly indicate
Comment x
choice (e.g. X)
s
and
white-
space
are
removed
Keywords x
are
replaced
with
tokens
Object x
code is
created
Symbol x
table
created
for
variables
Builds an x
abstract
syntax
tree

Total 5

© OCR 2025. You may photocopy this page. 50 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

9 i Line 5 1 Allow line 4 and 12


(AO2.1)
(1) Examiner’s Comments
Most candidates had little difficulty
identifying line 05 as the obvious
response, but some candidates did
choose the decision taking place at the
end of the do..until loop in line 12.

ii numbers 1 Examiner’s Comments


(AO2.1) Nearly all candidates correctly
(1) identified numbers as the correct
parameter name.

iii 1 mark per bullet up to a maximum of 2 2 Examiner’s Comments


marks, e.g.: (AO1.2) Candidates found it difficult to
(2) articulate a response that broke the
To temporarily hold data… purpose of the temp variable down in
…To allow the contents of two lines 06 to 08 into logical steps with
variables to be swapped reasons. Many candidates identified it
…to ensure that data is not as a temporary store, but few could
overwritten explain that it allowed the contents of
the two array positions to be swapped
without erroneously overwriting either
value.

iv 1 mark per bullet up to a maximum of 2 2 Examiner’s Comments


marks, e.g.: (AO1.2) Many responses to this question were
(2) generalised answers that stated that
signifies whether or not any swaps the sorted variable determined
have been made in a pass whether the data was sorted or not.
if still set to true at the end of a This could be an indication that
pass, then the list is sorted candidates did not have practical
experience of implementing a bubble
sort with a swap flag. Most candidates
did not appreciate the function of the
variable during each pass of the
bubble sort. Candidates need to be
well versed in the different ways of
implementing a bubble sort.

Total 6

© OCR 2025. You may photocopy this page. 51 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

10 a i 1 mark per box up to a maximum of 3 12


marks. AO1.1
(2)
Select puzzle and display blank grid AO1.2
(below new game) (2)
Select box and change colour of AO2.1
boxes (below play game) (23
Compare to answer and display AO3.3
correct/incorrect (below check (5)
answer)

e.g.

ii 1 mark per bullet up to a maximum of 2 2 AO1.1


marks, e.g: (1)
e.g. AO1.2
(1)
Splits the problem into smaller
chunks
Smaller problems are more
manageable
Smaller problems are easier to
solve
To see where code can be reused
in the solution
To split tasks between different
programmers

© OCR 2025. You may photocopy this page. 52 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii 1 mark for input, 1 for process 1 for 3 AO2.2


output (3)
e.g.
Input:

Clicking a box

Process:

Generating new puzzle


Checking if block is black
Changing block to white

Output:

Grid with coloured squares

© OCR 2025. You may photocopy this page. 53 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

b i 1 mark for each correctly completed 5 AO2.2 Accept


statement up to a maximum of 5 (2)
marks: AO3.2 for i = 0 to row.length-1
(3)
for i = 0 to row.length
01 function
countRow(puzzle:byref, for i=0 to 5
rowNum:byval)
02 count = 0
03 output = " "
04 for i = 0 To 4
05 if puzzle[rowNum, i]
== 1
then
06 count = count + 1
07 elseif count >= 1 then
08 output = output +
str(count) + " "
09 count = 0
10 endif
11 next i
12 if count>= 1 then
13
output=ouput+str(count)
14 elseif output == "" then
15 output = "0"
16 endif
17 return output
18 endfunction

ii 1 mark per bullet up to a maximum of 2 2 AO1.2


marks, e.g: (1)
AO2.2
Initialise the variable output… (1)
…with a space
…for use later on in the code…
…So it can be used for
concatenation later in the code …
…to avoid an error being generated

© OCR 2025. You may photocopy this page. 54 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii 1 mark per bullet up to a maximum of 3 3 AO2.2


marks, e.g: (3)

check the value stored in each


index
check whether it is at the end of a
row
check whether each row has been
given an output or not

iv 1 mark per bullet up to a maximum of 6 6 AO2.2 Accept


marks: (3)
AO3.2 for i = 0 to row.length-1
Procedure heading for (3)
displayRowAnswer for i = 0 to row.length
…taking puzzle as parameters
Nested loops through all array for i=0 to 5
elements
…outputting all rows
… at the end of each row calling
countRow ….
…..with parameters puzzle and the
current loop counter

e.g.
procedure
displayRowAnswer(puzzle)
for i = 0 To 4
for j = 0 To 4
print(puzzle[i, j] + "
")
next j
print (" " + countRow
(puzzle, i))
next i
endprocedure

v 1 mark for clearly identifying each error 3 AO2.1 Do not award marks for line numbers
and giving the correction. (3) alone without stating the error.

Line 01 needs answerGrid as Consider 1 mark for not changing line


parameter 04 but changing 05 to true and 09 to
Line 04 == should be != False
Line 08 should be next row

© OCR 2025. You may photocopy this page. 55 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

c Mark Band 3 – High level (7-9 marks) 9 AO1.1 AO1: Knowledge and Understanding
The candidate demonstrates a (2) Indicative content
thorough knowledge and AO1.2 Local variables:
understanding of local and global (2)
variables; the material is generally AO2.1 Scope within the module defined
accurate and detailed. (2) within
The candidate is able to apply their AO3.3 Cannot access externally unless
knowledge and understanding directly (3) passed as parameter, or returned
and consistently to the context from function
provided. When module is exited, memory of
Evidence/examples will be explicitly variable is freed
relevant to the explanation.
The candidate is able to weigh up the Global variables:
use of both local and global variables
which results in a supported and Scope within the entire program
realistic judgment as to whether it is Can access from anywhere
possible to use them in this context. Retained in memory permanently
There is a well-developed line of
reasoning which is clear and logically ByRef Points to location of variable
structured. The information presented ByVal Sends the value
is relevant and substantiated.
AO2: Application
Mark Band 2 – Mid level (4-6 marks)
The candidate demonstrates If global the arrays can be
reasonable knoledge and accessed from all modules by direct
understanding of local and global reference
variables; the material is generally If local to the main, the arrays will
accurate but at times underdeveloped. need to be passed as parameters
The candidate is able to apply their byreference
knowledge and understanding directly Can send ByVal – but not always
to the context provided although one or possible with arrays in some
two opportunities are missed. languages
Evidence/examples are for the most Modules are self contained and
part implicitly relevant to the then can be reused in other
explanation. programs he wants to create
The candidate makes a reasonable without needing to take the global
attempt to come to a conclusion variables with them
showing some recognition of
influencing factors that would AO3: Evaluation
determine whether it is possible to use e.g.
local and global variables in this
context. +ve Local = memory efficient
There is a line of reasoning presented +ve Global = easier programming,
with some structure. The information simpler to follow, easier to debug
presented is in the most part relevant -ve Global = memory inefficient, not

© OCR 2025. You may photocopy this page. 56 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance


and supported by some evidence good programming technique
-ve Local = more difficult to
Mark Band 1 – Low Level (1-3 marks) trace/debug/follow where the
The candidate demonstrates a basic values are passed
knowledge of local and global variables Relatively small program – don’t
with limited understanding shown; the know about overall plan for it, it
material is basic and contains some might not be memory intensive,
inaccuracies. The candidates makes a unlikely anyone else is going to
limited attempt to apply acquired access/amend e.g. use as a library
knowledge and understanding to the – therefore global would not waste
context provided. significant resources
The candidate provides nothing more
than an unsupported assertion.
The information is basic and
comunicated in an unstructured way.
The information is supported by limited
evidence and the relationship to the
evidence may not be clear.

0 marks
No attempt to answer the question or
response is not worthy of credit.

d 1 mark per bullet to max 4 4 AO2.1


e.g. (2)
AO2.2
Make use of random numbers (2)
Generate an x/horizontal size for
the grid
Generate a y/vertical size for the
grid
Loop through each row/column
…generate a number between 0
and the number of rows/columns
(depending on MP4 answer)
Loop through each box
…generate a 1 or 0 to store in it

Total 40

© OCR 2025. You may photocopy this page. 57 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

11 a 1 mark per pointer 2


AO1.2
queueHead: Point to the first (2)
element in the queue // next
element to remove
queueTail: Point to the last element
in the queue

b 1 mark per bullet up to max 5 5


AO2.1
first 3 jobs removed (2)
128 and 129 added in positions 4 AO2.2
and 5 respectively (3)
no additional jobs
queueHead being 3 (FT errors)
queueTail being 5 (FT errors) The underlying implementation of the
queue has not been specified, so allow
alternative valid answers.
e.g.
queueHead = 0
queueTail = 2
Location 2: 129
Location 1: 128
Location 0: 127

© OCR 2025. You may photocopy this page. 58 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

c i 1 mark per bullet to max 5 5


AO2.2
Function declaration (2)
Checking if queue is empty AO3.3
…returning null (3)
(Otherwise) incrementing Note: Accept alternative valid
queueHead underlying implementation answers
…returning e.g. Shifting all elements in queue
buffer[queueHead-1] forward.

e.g.
function dequeue()
if queueHead > queueTail
then
return null
else
queueHead = queueHead +
1
return
buffer[queueHead-1]
endif
endfunction

© OCR 2025. You may photocopy this page. 59 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

ii 1 mark per bullet to max 6 6


AO2.2
Function declaration taking (3)
parameter AO3.3
Checking if queue is full (3)
…returning -1
(Otherwise) incrementing queueTail
Adding newJob to buffer(queueTail)
Returning 1

e.g.
function enqueue(newJob)
if queueTail == 99 then
return -1
else
queueTail = queueTail +
1
buffer[queueTail] =
newJob
return 1
endif
endfunction

© OCR 2025. You may photocopy this page. 60 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii 1 mark per bullet to max 8 8


AO2.2
Inputting user choice (2)
If enqueue chosen input job name AO3.3
…call enqueue with input value as (6)
parameter
…check if return value is -1 and
output full
…otherwise output message that
item is added
If dequeue chosen
…call dequeue and save returned
value
…output returned value (jobname)
if not null
…or output queue is empty Allow equivalent checks / logic

e.g.
main()

choice = input("Add or remove?")

if choice == "ADD" then

jobname = input("Enter job name")

returnValue = enqueue(jobname)

if returnValue == -1 then

print("Queue full")

else

print("Job added")

endif

else

returnValue = dequeue()

if returnValue == null then

print("Queue empty")

else

output returnValue

endif

endif

endmain

© OCR 2025. You may photocopy this page. 61 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

d 1 mark per bullet to 3 3


AO2.1
Check if either head or tail are (1)
incremented to above 99 AO2.2
… set to be 0 instead (2) Credit equivalent modulo arithmetic
When checking if array is full check solution
if (queueTail == queueHead – 1)
OR (queueTail==99 AND
queueHead==0)

e 1 mark per bullet to max 3, e.g. 3


AO2.1
Use a different structure e.g. a (2)
linked list AO2.1
…items can be added at different (1) Allow other suitable descriptions that
points in the linked list depending show how the program could be
on priority amended.
…by changing the pointers to items
needing priority
Have different queues for different
priorities
…add the job to the queue relevant
to its priority
…print all the jobs in the highest
priority queue first

Total 32

© OCR 2025. You may photocopy this page. 62 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

12 – priceText set to midweek special 4 var date = new Date();


message on Tuesday (AO3.2) var dayCode = date.getDay();
– and Wednesday //0 is
– priceText set to normal message Sunday, 1 Monday, 2 Tuesday
on all other days etc
– The HTML of prices changed. var priceText="";

Award full marks if circumvented if(dayCode==2 || dayCode==3)


priceText and changed the HTML {
straight away. priceText="Midweek Special
– tickets £15 tonight";
(1 per - , max 4) }
else
{
priceText="Tickets £20
tonight";
}
document.getElementById("prices").inn
erHTML= priceText;

May have used else if instead of or


{} are optional as single line statements
Last part may be two lines
foo = document.getElementById
("prices")
foo.innerHTML= priceText;

Examiner’s Comments

There was a very clear distinction in


candidate responses between those
who had practical JavaScript
experience and those who did not.
Candidates with that experience
generally scored well on this question.
See Exemplar 2 which was given full
marks. Centres are reminded that
candidates should have experience of
writing basic JavaScript code like that
required in this question.

Exemplar 2

© OCR 2025. You may photocopy this page. 63 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

Total 4

13 Parallel processing will allow AO1.2 Examiner’s Comments


multiple separate (1)
jobs/instructions/FDE cycles to run AO2.1 To achieve all 3 marks for this
concurrently. (2) question, candidates needed to
Longer rendering jobs can be split, describe what parallel processing is,
shortening the overall time taken. and then be clear as to how this would
Different CPUs/cores can tackle affect the computer system in the
different question. Many candidates were not
frames/sections/components of the given all the available marks as they
video simultaneously. did not make clear links between
parallel processing and the scenario.

Total 3

© OCR 2025. You may photocopy this page. 64 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

14 a i Example: IF (A>=88) AND (A<=92) 2 Accept >87 as equivalent to >=88 etc...


THEN (i.e. candidates may assume that A is
an integer)
Award marks for a range that
Examiner's Comments

includes 90 On the whole this was poorly answered


has the correct limits with candidates not using the correct
programming construct. The typical
answer given was IF 88≥A≤92.

ii Example: IF (x - y) <0.1*x) OR ((y - x) 4 Accept multi-staged answers, and use


<(0.1*x) THEN of an ABS function or |x-y|

Award marks for answers that

find the difference between x and y Do not except DIV


find the difference between y and x
work out 10% of x Examiner's Comments
comparison between difference
Most candidates only provided an
answer for one boundary, usually (x-y),
and did not attempt (y-x).

b i A name / location in memory / 2


identifier Examiner's Comments
Used to store a value which can
change during execution On the whole this question was
answered well. However some
candidates did not make it clear that it
could ‘change during execution’, but
used phrases such as ‘it is not fixed’
etc.

ii x, y, A 1 cao

Examiner's Comments

Those candidates that did not achieve


the mark used the wrong case.

Total 9

© OCR 2025. You may photocopy this page. 65 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

15 CISC has a larger instruction set AO1.2 Accept any other valid pointsbr/>
RISC has a smaller instruction set (2) Mark in pairs

CISC is difficult to pipeline Examiner’s Comments


RISC is easier to pipeline
This question was generally answered
CISC tends to have more well with many candidates describing
addressing modes the number of clock cycles required to
RISC tends to have fewer execute instructions for RISC and
addressing modes CISC. Some candidates were not
given the marks because they did not
CISC instructions may take multiple use the correct terminology.
clock cycles to execute
RISC instructions take one clock
cycle to execute

CISC has complex circuitry/more


transistors.
RISC has less complex/simple
circuitry

CISC uses less RAM


RISC uses more RAM

Total 2

© OCR 2025. You may photocopy this page. 66 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

16 1 mark per bullet up to a maximum of 2 2 Accept


marks, e.g: AO1.1 More than one clock cycle for each
(1) instruction in CISC …
Some instructions in CISC will AO1.2 …one clock cycle for each instruction
rarely get used … (1) in RISC
… In RISC instructions are used For BP’s 3 and 4
regularly
In assembly for CISC, a statement
that takes one mnemonic …
… (may) take multiple mnemonics
in RISC
Compilers for RISC need to be
more complex …
… than compilers for CISC
CISC architecture has complex
circuitry and is therefore more
expensive to manufacture…
…RISC architecture has simple
circuitry minimising manufacture
cost.

Total 2

© OCR 2025. You may photocopy this page. 67 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

17 i - Tags to make “Features” a heading 5 For making Features a heading only


(accept h1, h2, h3 etc.) (AO3.2) accept strong/b if accompanied by
- Correct use of ol code to increase font size.
- Correct use of li tags
- Use of <a tag Around the text <h1>Features</h1>
“Download the Factsheet” The new OCR Smart Watch:
- correct use of href=”factsheet.pdf” <ol>
(1 Mark per -, max 5) <li>Uses the CB2 RISC
processor for long battery
life</li>
<li>Stores up to 20hrs of
music</li>
<li>Tracks fitness</li>
</ol>
<a
href="factsheet.pdf">Download
The Factsheet</a>

Li close tags are optional

Examiner’s Comments

Surprisingly fewer candidates than


anticipated gained full marks on this
question. Many candidates gained
some marks. Marks were invariably
lost on the HTML for the hyperlink.

ii - A program called a 3
spider/crawler/bot (AO2.1)
- Traverses the web / following the Examiner’s Comments
links.
- It takes each word in the document This question was poorly attempted.
- …It adds an entry for the page Many candidates mentioned a
(under the word) in the index… crawler/spider program but then failed
- …alongside the word’s position on to clearly describe the process. Some
the page. candidates went on to discuss ranking
(1 Mark per -, Max 3) even though the question specifically
stated not to.

© OCR 2025. You may photocopy this page. 68 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

iii - RISC has a smaller instruction set 3


(than CISC) (AO1.2)
- Requires fewer transistors / less Examiner’s Comments
complex circuitry
- Means less power is required. Most candidates achieved two marks
(1 Mark per -, Max 3) on this question with few referring to
the fact that RISC requires less
complex circuitry.

Total 11

18 advantage 2
- Costs less to design/produce.
because AO2.1
- Requires less cooling to be built in. (2)
- (If battery powered) can run off
smaller battery.
- Has fewer instructions than other
(CISC) processors. Examiner’s Comments
- Simpler (circuit/hardware)
design/manufacture. Some candidates did not gain credit
- Fewer transistors. because the advantage stated was not
(1 per -, max 2, 1 max from ‘because’ specific to the company, as the
group) question asked. Candidates should be
reminded to read the question
carefully.

Total 2

© OCR 2025. You may photocopy this page. 69 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

19 1 mark per bullet to max 2 for each 6


method Examiner’s Comments
e.g.
Extreme: The topic of software design
methodologies was one where
The programming stage is the main candidates could have done well if they
focus / priority had learnt definitions and
Is a form of agile development characteristics for each methodology.
Includes planning, design, code, While many candidates displayed a
test very poor knowledge of this there were
Testing is focused throughout some more comprehensive responses.
development Extreme programming often focused
Prioritises code quality... on agile methodologies and paired
... over documentation programming. The Waterfall model
Encourages the use of pair elicited responses that indicated that it
programming was a more linear model. For the Spiral
model many successful responses
Waterfall: identified that risk management was at
the heart of the model.
Includes analysis, design,
implementation/programming,
testing, evaluation (accept any
sensible variant of these phases)
Each phase is moved down in turn
// linear process
Phases can be revisited back in
turn

Spiral:

Incremental design
Includes planning, design,
programming and evaluation
At the end of all 4 phases it repeats
Each phase usually adds a new
element to the problem
Is used to manage risk
Prioritises riskiest elements first

Total 6

© OCR 2025. You may photocopy this page. 70 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

20 i 1 mark per bullet to max 4, e.g. 4 Max 2 marks if no explicit differences


identified between the models.
spiral works on a small set of
requirements… Examiner’s Comments
…waterfall starts with all
requirements Most candidates were able to display
spiral repeats from the start of the some knowledge of either the waterfall
cycle each time… model or the spiral model of software
…waterfall to repeat needs to development and were given some
reverse through previous stages marks for identifying relevant points.
first However, fewer could analyse the
Spiral focuses on risk mitigation… factor they gave and then describe the
… Waterfall focuses on the delivery difference between the two models for
of the project as a whole. that factor.

ii 1 mark e.g. 2 Examiner’s Comments

The client needs the program Candidates who demonstrated


quickly application of knowledge were able to
The client wants to be heavily interpret the requirements of the
involved question stem to determine valid
The project is only small reasons for why the waterfall model of
The project is low risk software development was not valid in
the context given. Clear responses
stated that the waterfall model was a
long process, but that the clients
wanted the system as soon as
possible.

iii 1 mark for name 1 mark for description 2 Accept any sensible methodology and
e.g. description,

agile/rapid application development Examiner’s Comments


building/use of prototypes
Many candidates successfully
extreme programming identified another model of software
type of agile // has subsequent development. The most popular
releases of new features responses were Agile and Rapid
Application Development. Fewer
candidates were then able to go on to
describe features of the model they
had selected.

Total 8

© OCR 2025. You may photocopy this page. 71 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

21 – Extreme programming is a software 4


development methodology. AO1.1 Examiner’s Comments
– Focus is on good quality code (2)
– It is an agile paradigm AO2.1 Most candidates correctly stated that
– it is designed to allow development (2) extreme programming is both agile and
to respond to changing user utilises paired programming. Fewer
requirements. candidates discussed its focus on high
– Involves paired programing quality code.
– Program is regularly reviewed /
iterative process.

Suited to this scenario as…

– Types of virus/threat is continually


changing/updating
– In order to detect virus effectively
there needs to be an emphasis on
code quality.

(1 per – Max 4. If no reason given for it


being suitable for scenario, max 3)

Total 4

© OCR 2025. You may photocopy this page. 72 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

22 i 1 mark per bullet 3

Tests the expected output… [1] AO1.2


…based on input [1] (3)
Does not look at the code // looks
only at program specification [1]
Examiner's Comment:
Many candidates had a weak grasp of
different testing methodologies and
confused black box testing with alpha,
beta and white box testing. This was
disappointing as it was a question that
could have been answered well from
basic recall.

ii 1 mark for two suitable normal data 3


1 mark for two suitable extreme data AO2.1
1 mark for two suitable invalid data (3)

Normal: any values between 1 and 100


(inclusive) [1]
Extreme: 1, 100 [1]
Invalid: <1, >100, "x" [1]
Examiner's Comment:
Many candidates could suggest
sensible values for normal test data,
but fewer understood how extreme and
invalid data differed.

Total 6

© OCR 2025. You may photocopy this page. 73 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

23 i – Feasibility Study 3
– Investigation / Requirements
Elicitation
– Analysis
– Design
– Implementation / Coding
– Testing
– Installation
– Documentation
– Evaluation
– Maintenance
(1 per –, max 3)

ii – Tends to suit large scale projects 2



– ..An OS is an example of such a
big project.
– Tends to suit projects with stable
requirements …
– … And the base requirements of an
OS are unlikely to change.
(1 per –, max 2)

iii If a change does occur in the 1


requirements the lifecycle cannot
respond easily, often at the cost of time
and money.

Total 6

© OCR 2025. You may photocopy this page. 74 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance

24 Mark Band 3–High Level 12 If only one methodology considered –


(9–12 marks) MAX 6 marks.
The candidate demonstrates a
thorough knowledge and AO1: Knowledge and Understanding
understanding of both methodologies; The following is indicative of possible
the material is generally accurate and factors / evidence that candidates may
detailed. refer to but is not prescriptive or
exhaustive:
The candidate is able to apply their
knowledge and understanding directly
and consistently to the context The waterfall lifecycle involves
provided. Evidence / examples will be linear stages whereas XP takes on
explicitly relevant to the explanation. an agile, iterative approach.
The waterfall lifecycle establishes
The candidate is able to weigh up both requirements in early stages and
sides of the argument which results in subsequent stages focus on these
a supported and realistic judgment as – new requirements can be adopted
to which methodology should be used. throughout XP.
The waterfall lifecycle focuses on
There is a well-developed line of the end user at the start and then
reasoning which is clear and logically they may be consulted at different
structured. The information presented points throughout the project
is relevant and substantiated. whereas an end user is integral
throughout XP.
Mark Band 2–Mid Level In the waterfall lifecycle the
(5–8 marks) development phase focuses on
The candidate demonstrates code that meets the requirements /
reasonable knowledge and design. In XP the quality of the
understanding of both methodologies; code is an important factor – paired
the material is generally accurate but programming helps focus on this.
at times underdeveloped. The The waterfall lifecycle although
candidate is able to apply their adopted for large projects it can be
knowledge and understanding directly inflexible and limits changing
to the context provided although one or requirements.
two opportunities are missed. Evidence
/ examples are for the most part AO2.1: Application
implicitly relevant to the explanation. The selected knowledge / examples
The candidate makes a reasonable should be directly related to the
attempt to come to a conclusion specific question.
showing some recognition of
influencing factors that would
determine which methodology should Discussion of how the
be used. methodologies would impact upon
the choices made regarding
There is a line of reasoning presented abstraction, any preconditions and

© OCR 2025. You may photocopy this page. 75 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance


with some structure. The information how they are addressed.
presented is in the most part relevant Discussion around how the
and supported by some evidence. methodologies would impact the
order of steps in any procedures
Mark Band 1–Low Level and how sub-procedures would be
(1–4 marks) implemented
The candidate demonstrates a basic How the methodologies could
knowledge of methodologies with potentially affect how decisions and
limited understanding shown; the the logic involved are dealt with and
material is basic and contains some how concurrency is dealt with
inaccuracies. The candidate makes a Discussion of other social factors
limited attempt to apply acquired that affect the use of the different
knowledge and understanding to the methodologies.
context provided.
AO3.3: Evaluation
The candidate provides nothing more Having considered the different sides
than an unsupported assertion. to the argument candidates will need to
The information is basic and reach a supported judgment based on
communicated in an unstructured way. the evidence included in their
The information is supported by limited response.
evidence and the relationship to the
evidence may not be clear. There should be no bias in marks as to
0 marks which methodology is chosen but
No attempt to answer the question or especially in the top mark band there
response is not worthy of credit. must be a clear link between the points
candidates have made and
justification.

e.g.
The waterfall lifecycle establishes
requirements in early stages and
subsequent stages focus on these.
New requirements can be adopted
throughout XP. The requirements in
this project are likely to be static
making the Waterfall model a more
appropriate approach.

OR

In the waterfall lifecycle the


development phase focuses on code
that meets the requirements / design.
In XP the quality of the code is an
important factor. Paired programming

© OCR 2025. You may photocopy this page. 76 of 77 Created in ExamBuilder


Mark Scheme

Question Answer/Indicative content Marks Guidance


helps focus on this.

For this utility to be successful it must


work more efficiently than its
competitors and code developed
through XP is more likely to achieve
this, therefore XP is a more
appropriate approach.

Total 12

© OCR 2025. You may photocopy this page. 77 of 77 Created in ExamBuilder

Powered by TCPDF (www.tcpdf.org)

You might also like