Big Coding Y11
Big Coding Y11
A searching algorithm is used to find a word in the array data. The algorithm used to search for a word is
shown.
found = False
for i = 0 to 7
found = True
endif
next i
print(found)
© OCR 2024. You may photocopy this page. 1 of 250 Created in ExamBuilder
[4]
© OCR 2024. You may photocopy this page. 2 of 250 Created in ExamBuilder
2 OCR Drones flies goods around the country using drones.
A pilot is allowed to fly a maximum of 9 hours per day. The pilot code and the hours flown for each flight in one
day are stored in a 2D array of strings with the identifier journeys.
© OCR 2024. You may photocopy this page. 3 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 4 of 250 Created in ExamBuilder
3(a) Give the output of the algorithm.
temp = 7
print(temp)
endif
[1]
(b) value = 3
value = value - 1
print(value * 2)
[1]
4(a) OCR Drones flies goods around the country using drones.
The text file is named pilots.txt. The contents of some of this file is shown:
JP670,17/05/1986
CC200,31/06/1980
SM720,01/04/1976
GC730,06/06/1978
© OCR 2024. You may photocopy this page. 5 of 250 Created in ExamBuilder
[4]
© OCR 2024. You may photocopy this page. 6 of 250 Created in ExamBuilder
(b) Pilots are paid a set amount each day. Pilots also get an additional payment for each mile they have flown that
day. These payments are shown in the table.
For example, a pilot with 3 years’ experience who flies 100 miles in one day will receive a total of £215.00 pay.
This is calculated in the following way:
• Calculate the total pay for the pilot for that day
totalPay = 0
© OCR 2024. You may photocopy this page. 7 of 250 Created in ExamBuilder
print(totalPay)
[4]
(ii) The programmer decides to make a function to calculate the total pay for the pilot.
The function is called calculatePay().
The function takes the values for experience and miles as two parameters and returns the total pay for
the pilot.
Refine the algorithm to use this function and output the pay for the pilot.
print( totalPay )
[2]
© OCR 2024. You may photocopy this page. 8 of 250 Created in ExamBuilder
(c) A pilot’s flying experience is validated. An algorithm checks that the experience is between 0 and 20 years.
print(True)
else
print(False)
endif
© OCR 2024. You may photocopy this page. 9 of 250 Created in ExamBuilder
(d) A pilot code is automatically generated when a new pilot joins the company.
You may not need to use all rows in the trace table.
01 H
02 K
03 9
[4]
© OCR 2024. You may photocopy this page. 10 of 250 Created in ExamBuilder
5(a) A player enters a code at the beginning of a computer game. The code is three characters long.
The code sets the level of the game. The game has three levels.
[6]
(ii) When a player completes a level, they move to the next level.
© OCR 2024. You may photocopy this page. 11 of 250 Created in ExamBuilder
Write a function called nextlevel() that:
[3]
(iii) Complete the line of code to output the value returned from the function nextlevel() when the integer
value 3 is passed in as a parameter.
print(…………………….……………..….……..…..(…………………….…....……………..….))
[1]
© OCR 2024. You may photocopy this page. 12 of 250 Created in ExamBuilder
(b) The result of a computer game can be a win, a loss or a draw. The result is stored in a variable with the identifier
result.
(i) State why result cannot be stored using a Boolean data type.
[1]
(ii) Give a suitable data type for result. Explain your answer, showing how each result could be stored.
Data type
Explanation
[2]
(c) In a computer game, a player collects items. Each item has a score. The score for each item is stored using the
data type real.
[1]
© OCR 2024. You may photocopy this page. 13 of 250 Created in ExamBuilder
6(a) OCR Security Services need to identify the total number of seconds the sensors have been activated on a
specific date.
The data from the database table events is imported into the program written in a highlevel programming
language.
The program stores the data in a two-dimensional (2D) string array with the identifier arrayEvents
(i) An array can only store data of one data type. Any non-string data must be converted to a string before
storing in the array.
[1]
© OCR 2024. You may photocopy this page. 14 of 250 Created in ExamBuilder
[6]
(b) A program written in a high-level language is used to access the data from a database.
This program has a procedure, SaveLogs(), that stores the data to an external text file.
© OCR 2024. You may photocopy this page. 15 of 250 Created in ExamBuilder
You must use either:
• OCR Exam Reference Language, or
• A high-level programming language that you have studied.
[6]
(c) An alarm system has multiple sensors. Each type of sensor has a code. The code for each sensor is given in the
table:
Code Sensor
MS Motion sensor
DS Door sensor
© OCR 2024. You may photocopy this page. 16 of 250 Created in ExamBuilder
WS Window sensor
02 if(CheckSensorCode(sensorType)) then
05 ResetSensor(sensorID)
06 endif
[1]
[1]
(iii) Identify the data type of the data returned by the function CheckSensorCode()
[1]
[1]
(v) Identify two programming constructs that have been used in the program.
2 [2]
© OCR 2024. You may photocopy this page. 17 of 250 Created in ExamBuilder
(d) An alarm has an algorithm that decides whether to sound the alarm by checking the data that is stored in the
following three variables.
• SystemArmed
• DoorSensorActive
• WindowSensorActive
The alarm will only sound when the alarm has been activated and one or both of the door and window sensors
are activated. When the system needs to sound the alarm it calls the pre-written procedure SoundAlarm()
Write a program that checks the data in the variables and calls SoundAlarm() when appropriate.
[4]
© OCR 2024. You may photocopy this page. 18 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 19 of 250 Created in ExamBuilder
8 OCR Security Services is a company that installs intruder alarm systems in commercial buildings.
The systems use a computer that is connected to the door sensors and window sensors.
Tick (✓) one box in each row to identify the most appropriate data type for each variable.
© OCR 2024. You may photocopy this page. 20 of 250 Created in ExamBuilder
9(a) Charlie is developing an adding game. The rules of the game are:
Identify two methods of validation and explain how they can be used on this game.
Validation method 1
Use
Validation method 2
Use
[6]
© OCR 2024. You may photocopy this page. 21 of 250 Created in ExamBuilder
(b) Charlie has been told that the game will need to be tested before giving it to the players.
[2]
(ii) Complete the table by naming and describing one type of test that should be used on Charlie's program
before releasing it.
[2]
(iii) Complete the table by identifying and describing two features of an IDE that can be used when testing a
program.
Feature Description
[4]
© OCR 2024. You may photocopy this page. 22 of 250 Created in ExamBuilder
10 A garden floodlight system uses inputs from sensors and switches to decide whether it should be turned on.
The table shows the inputs into the system and the meaning of each input value:
The floodlight (Q) is designed to be on (Q = 1) when the switch is turned on and the motion sensor detects
motion at nighttime.
[3]
© OCR 2024. You may photocopy this page. 23 of 250 Created in ExamBuilder
11 An insertion sort is one type of sorting algorithm.
A student has written a pseudocode algorithm to perform an insertion sort on a 1D array names.
pos = count
temp = names[pos]
names[pos] = names[pos – 1]
names[pos – 1] = temp
pos = pos – 1
endwhile
next count
Describe the purpose of the variable temp in the insertion sort pseudocode algorithm.
[2]
© OCR 2024. You may photocopy this page. 24 of 250 Created in ExamBuilder
12(a) This pseudocode algorithm totals all the numbers in the 0-indexed array scores
01 total = 0
04 next scoreCount
05 print(total)
Corrected line
Corrected line
[4]
© OCR 2024. You may photocopy this page. 25 of 250 Created in ExamBuilder
(b) State what is meant by a syntax error and a logic error.
Syntax error
Logic error
[2]
© OCR 2024. You may photocopy this page. 26 of 250 Created in ExamBuilder
13(a) Read the following pseudocode algorithm:
01 start = 3
02 do
03 print(start)
04 start = start - 1
05 until start == -1
06 print("Finished")
[3]
© OCR 2024. You may photocopy this page. 27 of 250 Created in ExamBuilder
(b) Three incomplete pseudocode algorithms are given with a description of the purpose of each algorithm.
print(12 ……………… 2)
[1]
number = 53
print("Even number")
else
print("Odd number")
endif
[1]
measurement1 = 300
measurement2 = 100
Write pseudocode to add the integers stored in num1 and num2. Store the result in a variable with the identifier
total
[1]
© OCR 2024. You may photocopy this page. 28 of 250 Created in ExamBuilder
14(a) A hotel has nine rooms that are numbered from room 0 to room 8.
The number of people currently staying in each room is stored in an array with the identifier room.
Array room
Index 0 1 2 3 4 5 6 7 8
Data 2 1 3 2 1 0 0 4 1
The following program counts how many people are currently staying in the hotel.
for count = 1 to 8
total = 0
next count
print(total)
Describe how the program can be refined to remove these logic errors.
[2]
© OCR 2024. You may photocopy this page. 29 of 250 Created in ExamBuilder
(b) Customers at a hotel can stay between 1 and 5 (inclusive) nights and can choose between a basic room or a
premium room.
A Basic room costs £60 each night. A Premium room costs £80 each night.
(i) Create a function, newPrice(), that takes the number of nights and the type of room as parameters,
calculates and returns the price to pay.
[4]
© OCR 2024. You may photocopy this page. 30 of 250 Created in ExamBuilder
(ii) Write program code, that uses newPrice(), to output the price of staying in a Premium room for 5 nights.
[3]
© OCR 2024. You may photocopy this page. 31 of 250 Created in ExamBuilder
(c) When a new booking is recorded, the details are entered into a program to validate the values. The following
criteria are checked:
• firstName and surname are not empty
• room is either “basic” or “premium”
• nights is between 1 and 5 (inclusive).
If any invalid data is found “NOT ALLOWED” is displayed.
If all data is valid “ALLOWED” is displayed.
stayComplete = False
© OCR 2024. You may photocopy this page. 32 of 250 Created in ExamBuilder
[5]
(ii) Complete the following test plan to check whether the number of nights is validated correctly.
© OCR 2024. You may photocopy this page. 33 of 250 Created in ExamBuilder
[3]
15 Jack is writing a program to add up some numbers. His first attempt at the program is shown.
a = input(“Enter a number”)
b = input(“Enter a number”)
c = input(“Enter a number”)
d = input(“Enter a number”)
e = input(“Enter a number”)
f = (a + b + c + d + e)
print(f)
Jack decides to improve his program. He wants to be able to input how many numbers to add together each time
the algorithm runs, and also wants it to calculate and display the average of these numbers.
Write an algorithm to:• ask the user to input the quantity of numbers they want to enter and read this value as
input
• repeatedly take a number as input, until the quantity of numbers the user input has
been entered
• calculate and output the total of these numbers
• calculate and output the average of these numbers.
© OCR 2024. You may photocopy this page. 34 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 35 of 250 Created in ExamBuilder
16 Customers at a hotel can stay between 1 and 5 (inclusive) nights and can choose between a basic room or a
premium room.
firstName Amaya
surname Taylor-Ling
nights 3
room Premium
stayComplete False
(i) State the most appropriate data type for the following fields:
Nights
Room
[2]
(ii) Give the name of one field that could be stored as a Boolean data type.
[1]
The following SQL statement is written to display all customer bookings that stay more than one night.
SELECT ALL
FROM TblBookings
IF Nights < 1
© OCR 2024. You may photocopy this page. 36 of 250 Created in ExamBuilder
[4]
17 Jack is writing a program to add up some numbers. His first attempt at the program is shown.
a = input(“Enter a number”)
b = input(“Enter a number”)
c = input(“Enter a number”)
d = input(“Enter a number”)
e = input(“Enter a number”)
f = (a + b + c + d + e)
print(f)
Give two ways that the maintainability of this program could be improved.
[2]
© OCR 2024. You may photocopy this page. 37 of 250 Created in ExamBuilder
18 A linear search could be used instead of a binary search.
Describe the steps a linear search would follow when searching for a number that is not in the given list.
[2]
19(a) A fast food restaurant offers half-price meals if the customer is a student or has a discount card. The offer is not
valid on Saturdays.
The restaurant needs an algorithm designing to help employees work out if a customer can have a half price
meal or not. It should:
© OCR 2024. You may photocopy this page. 38 of 250 Created in ExamBuilder
[5]
© OCR 2024. You may photocopy this page. 39 of 250 Created in ExamBuilder
(b) The restaurant adds a service charge to the cost of a meal depending on the number of people at a table. If
there are more than five people 5% is added to the total cost of each meal.
Customers can also choose to leave a tip, this is optional and the customer can choose between a percentage of
the cost, or a set amount.
Identify all the additional inputs that will be required for this change to the algorithm.
[2]
(c)
A computer system is used to identify whether the customer can have a half-price meal.
(i) Complete the following logic diagram for P = (A OR B) AND NOT C by drawing one logic gate in each box.
© OCR 2024. You may photocopy this page. 40 of 250 Created in ExamBuilder
[3]
[2]
(iii) State how many rows (excluding any headings) would be required in a truth table for the logic expression:
P = (A OR B) AND NOT C
[1]
[1]
© OCR 2024. You may photocopy this page. 41 of 250 Created in ExamBuilder
(b) Tick (✓) one box in each row to identify whether the OCR Reference Language code given is an example of
selection or iteration.
whilescore != 0
playgame()
endwhile
if playerHit() then
score = 0
endif
switch bonus:
case 0:
score = 9
case 1:
score = 7
case 2:
score = 5
endswitch
[4]
© OCR 2024. You may photocopy this page. 42 of 250 Created in ExamBuilder
21(a) OCRBlocks is a game played on a 5 × 5 grid. Players take it in turns to place blocks on the board.
The board is stored as a two-dimensional (2D) array with the identifier gamegrid
Fig. 6.1 shows that players A and B have placed three blocks each so far.
Fig. 6.1
The function checkblock() checks whether a square on the board has been filled. When checkblock(4,2)
is called, the value "A" is returned.
function checkblock(r,c)
if gamegrid[r,c] == "A" or gamegrid[r,c] == "B" then
outcome = gamegrid[r,c]
else
outcome = "FREE"
endif
return outcome
endfunction
Write an algorithm to allow player A to select a position for their next block on the game board.
© OCR 2024. You may photocopy this page. 43 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 44 of 250 Created in ExamBuilder
(b) When checkblock(-1,6) is called, an error is produced.
[1]
(ii) Describe how validation could be added in to the checkblock() function to stop this error from occurring.
[3]
(c) State one feature of checkblock() that shows that it is a function and not a procedure.
[1]
(d) Give the returned value when the following statements are called.
© OCR 2024. You may photocopy this page. 45 of 250 Created in ExamBuilder
22(a) A programmer declares the following variables.
Strings can be concatenated (joined together) using the + operator. For example, print("Maths " +
second) will output Maths is great
Use string manipulation with the variables first and/or second to produce the following output.
(i) great
[1]
(ii) Computer
[1]
[1]
© OCR 2024. You may photocopy this page. 46 of 250 Created in ExamBuilder
(b) State the output from the following lines of program code.
(i) print(first.length)
[1]
[1]
(iii) print(3 ^ 2)
[1]
Taylor needs to be able to enter a numeric value which is added to a total which initially starts at 0.
For the next part of the experiment, Taylor needs to be able to enter 10 values and count how many of the
values are over 50, outputting this value once all values have been entered.
© OCR 2024. You may photocopy this page. 47 of 250 Created in ExamBuilder
[5]
(ii) Write a pseudocode algorithm that uses iteration to allow Taylor to:
• enter 10 values
• count how many values are over 50
© OCR 2024. You may photocopy this page. 48 of 250 Created in ExamBuilder
• output the count of values over 50 after all 10 values are entered.
[5]
© OCR 2024. You may photocopy this page. 49 of 250 Created in ExamBuilder
(b) The input to the program could be an integer or real value.
(i) State what is meant by a real data type and give an example of this data type.
[2]
(ii) State what is meant by an integer data type and give an example of this data type.
[2]
© OCR 2024. You may photocopy this page. 50 of 250 Created in ExamBuilder
(c) Write an algorithm to implement Taylor’s requirements.
[6]
© OCR 2024. You may photocopy this page. 51 of 250 Created in ExamBuilder
24 A program is being created to convert the data capacity of a storage device into a different measure.
The function, calculate(), takes the measurement (e.g. gigabytes) and the number (e.g. 2) as two
parameters. It then returns the value in bits. The function returns –1 if an invalid measurement was entered.
else
..................................................
endif
return ..................................................
endfunction [6]
© OCR 2024. You may photocopy this page. 52 of 250 Created in ExamBuilder
25 The following names of students are stored in an array with the identifier studentnames.
[6]
© OCR 2024. You may photocopy this page. 53 of 250 Created in ExamBuilder
26(a)
(i) Draw the logic diagram for the logic system P = A OR (B AND C)
[3]
(ii) Complete the truth table for the logic system P = NOT (A OR B)
A B P
0 0 1
0 1
1 0
© OCR 2024. You may photocopy this page. 54 of 250 Created in ExamBuilder
[4]
(b) DIV and MOD are both operators used in computing-related mathematics.
[1]
[1]
27(a) The vending machine can be in one of three states: on, off or suspended. A user can change the state of the
vending machine by using the following algorithm.
switch newstate:
case "on":
statevalue = 1
case "off":
statevalue = 2
case "suspended":
statevalue = 3
default:
print("Invalid state")
endswitch
Rewrite the algorithm to perform the same actions using IF statements in place of the switch statement.
© OCR 2024. You may photocopy this page. 55 of 250 Created in ExamBuilder
[5]
(b) The algorithm for one section of a vending machine program is shown in pseudocode.
venditem()
giveChange(money – price)
else
endif
[1]
(ii) State how many parameters are passed into the giveChange() subroutine.
[1]
© OCR 2024. You may photocopy this page. 56 of 250 Created in ExamBuilder
(c) A vending machine has the following options available.
Users insert coins into the vending machine and then enter the two character item code of their selection. If the
user has inserted enough money, the vending machine will release the chosen item and output any change
required. If the user enters an invalid item code then a suitable error message is displayed.
© OCR 2024. You may photocopy this page. 57 of 250 Created in ExamBuilder
[5]
(d) When writing the program for the vending machine, maintainability was considered.
(i) Identify two ways that the program in the part above has been made more maintainable.
[2]
(ii) Give one additional way that the maintainability of the program can be improved.
[1]
© OCR 2024. You may photocopy this page. 58 of 250 Created in ExamBuilder
(e) The vending machine is tested before it is released.
[2]
(ii) Describe the difference between iterative testing and final testing.
[2]
(iii) Complete the following test plan for the vending machine.
© OCR 2024. You may photocopy this page. 59 of 250 Created in ExamBuilder
28 Dru writes the following program using a high-level language.
01 function newscore(a,b)
02 temp = a*b
03 temp = temp + 1
04 return temp
05 endfunction
06 score = 18
07 name = "Dru"
08 print (score)
09 print ("name")
10 print (newscore(score,2))
11 print (score)
The following table contains the program code for each line where this program outputs values.
09 print ("name")
10 print (newscore(score,2))
11 print (score)
[4]
29(a) A program creates usernames for a school. The first design of the program is shown in the flowchart in Fig. 2.
© OCR 2024. You may photocopy this page. 60 of 250 Created in ExamBuilder
Fig. 2
For example, using the process in Fig. 2, Tom Ward’s username would be TomWa.
State, using the process in Fig. 2, the username for Rebecca Ellis.
[1]
• If the person is a teacher, their username is the last 3 letters of their surname and then the first 2 letters of
their first name.
• If the person is a student, their username is the first 3 letters of their first name and then the first 2 letters of
their surname.
© OCR 2024. You may photocopy this page. 61 of 250 Created in ExamBuilder
(i) What would be the username for a teacher called Fred Biscuit using the updated process?
[1]
(ii) Write an algorithm for the updated program design shown in (i).
[6]
© OCR 2024. You may photocopy this page. 62 of 250 Created in ExamBuilder
30(a) A second program needs to perform the following tasks:
[5]
© OCR 2024. You may photocopy this page. 63 of 250 Created in ExamBuilder
(b) A program needs to perform the following tasks:
.....................................
else
.....................................
endif
[4]
© OCR 2024. You may photocopy this page. 64 of 250 Created in ExamBuilder
31(a) Tick (✓) one box to identify the correct logic diagram for P = NOT(A AND B).
[1]
© OCR 2024. You may photocopy this page. 65 of 250 Created in ExamBuilder
(b) Complete the truth table in Fig. 1 for the Boolean statement P = NOT(A AND B).
A B P
0 0 1
0 1 ..................
1 0 ..................
1 1 0
Fig. 1
[2]
32(a) OCR Tech is an online shop that sells electronics such as TVs and game consoles.
Customers can use a discount code to reduce the price of their purchase. Valid discount codes and their value
(in pounds) are stored in a global two-dimensional (2D) array with the identifier discount. The following table
shows part of this 2D array.
For example, discount[2,0] holds discount code BGF2 and discount[2,1] holds the discount of 15
pounds.
A function searches through the 2D array and applies the discount to the price. The price and discount code are
passed in as parameters. The algorithm design is not complete.
© OCR 2024. You may photocopy this page. 66 of 250 Created in ExamBuilder
function checkdiscount(price, code)
newprice = price
size = len(discount) – 1
for x = 0 to ....................
if discount[x,0] == ................ then
newprice = ................ – discount[................]
endif
next x
............................
endfunction
[5]
[2]
© OCR 2024. You may photocopy this page. 67 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 68 of 250 Created in ExamBuilder
(b) An item is classified as "In demand" if OCR Tech have between 5 and 25 inclusive in stock.
A program is written that allows the user to input the current stock level and output whether the item is in
demand or not.
Refine the program to correct the errors and write the refined version of the program.
[5]
© OCR 2024. You may photocopy this page. 69 of 250 Created in ExamBuilder
(c) The following flowchart shows an algorithm to calculate the price of an item during a sale period.
100 Boundary
150 Normal
200 Boundary
© OCR 2024. You may photocopy this page. 70 of 250 Created in ExamBuilder
250 Normal
[3]
[6]
© OCR 2024. You may photocopy this page. 71 of 250 Created in ExamBuilder
(d) Items for sale are stored in the database table tblStock. An extract of this table is shown.
FROM tblStock
FROM table
FROM database
[3]
© OCR 2024. You may photocopy this page. 72 of 250 Created in ExamBuilder
33 A car dealership uses a computer system to record details of the cars that it has for sale. Each car has a make,
model, age and number of miles driven.
The car dealership sells electric cars, which require charging before they can be driven. Charging the battery by
1% takes 10 minutes.
For example, a battery has 80% charge. It would take 200 minutes, or 3 hours and 20 minutes to charge to
100%.
© OCR 2024. You may photocopy this page. 73 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 74 of 250 Created in ExamBuilder
34(a) A cinema uses the following criteria to decide if a customer is allowed to see a film that has a 15 rating:
Customers have to be 15 years of age or older to see the film. They also need to either have a ticket or
have the money to buy a ticket.
The table shows the inputs to the system that will output whether the customer can watch the film.
[3]
© OCR 2024. You may photocopy this page. 75 of 250 Created in ExamBuilder
(b) Draw this system using logic gates.
[2]
(c) The cinema has three screens: "Red", "Black" and "Yellow".
The function freeseats() counts how many seats are available in each screen. The name of the screen is
passed in as a string parameter and the number of free seats is returned as an integer.
Write code using the function freeseats() to find the number of seats available in screen Red and assign this
to a variable with identifier redseats.
[2]
© OCR 2024. You may photocopy this page. 76 of 250 Created in ExamBuilder
35 A car dealership uses a computer system to record details of the cars that it has for sale. Each car has a make,
model, age and number of miles driven.
The car dealership only sells cars that have fewer than 10 000 miles and are 5 years old or less.
• ask the user to enter the number of miles and the age of a car
• validate the input to check that only sensible values that are in the given range are entered
• output True if valid data has been entered or False if invalid data has been entered.
[5]
(ii) The validation routine from part (i) must be tested with normal, erroneous and boundary test data.
Miles Age
Normal
Erroneous
© OCR 2024. You may photocopy this page. 77 of 250 Created in ExamBuilder
Boundary
[3]
[1]
36 A school uses a mobile phone app to allow parents to book appointments for parents’ evenings.
Parents must log in before they can use the system. They then choose to book a new appointment, view all
appointments already made or update their personal details. If parents choose to view their appointments, they
can either view them on-screen or print them off.
A structure diagram has been used to design the mobile phone app.
Write one letter from the following table in each space to complete the structure diagram.
Letter Task
A Book new appointment
B Check attendance of child
C Update personal details
D View appointments on-screen
E Log out of the system
F Print a paper copy of appointments
© OCR 2024. You may photocopy this page. 78 of 250 Created in ExamBuilder
[4]
© OCR 2024. You may photocopy this page. 79 of 250 Created in ExamBuilder
37(a) A teacher writes an algorithm to store the name of the game a student plays each night (for example "OCR Zoo
Simulator").
valid = false
while(valid == false)
gamesPlayed = gameName.upper
valid = true
else
endif
endwhile
The algorithm needs testing to make sure the IF-ELSE statement works correctly.
Identify two different pieces of test data that can be used to test different outputs of the algorithm. Give the
output from the program for each piece of test data.
Test data 1
Expected output
Test data 2
Expected output
[4]
© OCR 2024. You may photocopy this page. 80 of 250 Created in ExamBuilder
(b) A teacher researches the length of time students spend playing computer games each day.
The teacher asks students how long they spend completing homework. Students answer in minutes and hours
(for example 2 hours 15 minutes).
The teacher would like to create an algorithm that will display students’ inputs in minutes only.
(i) Identify the input and output required from this algorithm.
Input
Output
[2]
(ii) A program is created to convert hours and minutes into a total number of minutes.
(iii) The following flowchart outputs a message depending on how long each person has spent playing computer
© OCR 2024. You may photocopy this page. 81 of 250 Created in ExamBuilder
games.
[4]
© OCR 2024. You may photocopy this page. 82 of 250 Created in ExamBuilder
(c) The following program uses a condition-controlled loop.
x = 15
y = 0
while x > 0
y = y + 1
x = x – y
endwhile
print(y)
x y output
[4]
© OCR 2024. You may photocopy this page. 83 of 250 Created in ExamBuilder
(d) The teacher writes a program to add up and print out the total number of minutes student 2 played computer
games over 5 days (Monday to Friday).
total = 0
total = total + minsPlayed[2,0]
total = total + minsPlayed[2,1]
total = total + minsPlayed[2,2]
total = total + minsPlayed[2,3]
total = total + minsPlayed[2,4]
print(total)
Refine the program to be more efficient. Write the refined version of the algorithm.
[4]
© OCR 2024. You may photocopy this page. 84 of 250 Created in ExamBuilder
(e) Data for one week (Monday to Friday) is stored in a 2D array with the identifier minsPlayed.
The teacher wants to output the number of minutes Dan (column index 3) played computer games on
Wednesday (row index 2). The following code is written:
print(minsPlayed[3,2])
Write program code to output the number of minutes that Stuart played computer games on Friday.
[1]
© OCR 2024. You may photocopy this page. 85 of 250 Created in ExamBuilder
(f) The program should only allow values from 0 to 300 inclusive as valid inputs. If the data entered breaks this
validation rule, an error message is displayed.
(i) Complete the following program to output "Invalid input" if the data does not meet the validation rule.
endif [3]
(ii) Complete the following test plan for the program in (i).
© OCR 2024. You may photocopy this page. 86 of 250 Created in ExamBuilder
(g) Tick (✓) one box to identify the data type you would choose to store the data and explain why this is a suitable
data type.
Explanation:
[2]
38(a) The area of a circle is calculated using the formula π × r2 where π is equal to 3.142 and r is the radius.
A program is written to allow a user to enter the radius of a circle as a whole number between 1 and 30, then
calculate and output the area of the circle.
01 radius = 0
02 area = 0.0
03 radius = input("Enter radius")
04 if radius < 1 OR radius > 30 then
05 print("Sorry, that radius is invalid")
06 else
07 area = 3.142 * (radius ^ 2)
08 print (area)
09 endif
Tick (✓) one box in each row to identify whether each programming construct has or has not been used in the
program.
Selection
Iteration
[3]
© OCR 2024. You may photocopy this page. 87 of 250 Created in ExamBuilder
(b) Identify two variables used in the program.
[2]
(c) Explain, using examples from the program, two ways to improve the maintainability of the program.
[4]
© OCR 2024. You may photocopy this page. 88 of 250 Created in ExamBuilder
39(a) A program uses a file to store a list of words that can be used in a game.
Show the stages of a binary search to find the word zebra using the data shown in Fig. 4.
[4]
© OCR 2024. You may photocopy this page. 89 of 250 Created in ExamBuilder
(b) Show the stages of a bubble sort when applied to data shown in Fig. 3.
[4]
© OCR 2024. You may photocopy this page. 90 of 250 Created in ExamBuilder
40(a) OCR Land is a theme park aimed at children and adults. Entrance tickets are sold online. An adult ticket to OCR
Land costs £19.99, with a child ticket costing £8.99. A booking fee of £2.50 is added to all orders.
One ride in OCR Land has a minimum height of 140 cm to ride alone or 120 cm to ride with an adult.
© OCR 2024. You may photocopy this page. 91 of 250 Created in ExamBuilder
© OCR 2024. You may photocopy this page. 92 of 250 Created in ExamBuilder
[8]
© OCR 2024. You may photocopy this page. 93 of 250 Created in ExamBuilder
(b) OCR Land keeps track of the size of queues on its rides by storing them in an array with the identifier
queuesize. It uses the following bubble sort algorithm to put these queue sizes into ascending numerical order.
01 swaps = True
02 while swaps
03 swaps = False
04 for p = 0 to queuesize.length-2
05 if queuesize[p] > queuesize[p+1] then
06 temp = queuesize[p]
07 queuesize[p] = queuesize[p+1]
08 queuesize[p+1] = temp
09 swaps = True
10 endif
11 next p
12 endwhile
(i) Explain the purpose of the Boolean variable swaps in this bubble sort algorithm.
[2]
© OCR 2024. You may photocopy this page. 94 of 250 Created in ExamBuilder
[2]
(iii) Describe one way that the maintainability of this algorithm could be improved.
[2]
(iv) Give the names of two other sorting algorithms that could be used instead of bubble sort.
[2]
© OCR 2024. You may photocopy this page. 95 of 250 Created in ExamBuilder
(c) A list of valid discount codes is shown below.
(i) State one reason why a binary search would not be able to be used with this data.
[1]
(ii) Give the name of one searching algorithm that would be able to be used with this data.
[1]
(d) OCR Land regularly emails discount codes to customers. Each discount code includes a check digit as the last
character.
(i) Give one benefit of using a check digit for the discount code.
[1]
© OCR 2024. You may photocopy this page. 96 of 250 Created in ExamBuilder
(e) A function, ticketprice(), takes the number of adult tickets and the number of child tickets as parameters. It
calculates and returns the total price to be paid.
© OCR 2024. You may photocopy this page. 97 of 250 Created in ExamBuilder
[6]
(ii) Tick (✓) one box to identify the data type of the value returned from the function ticketprice(), justifying
your choice.
Justification
[2]
© OCR 2024. You may photocopy this page. 98 of 250 Created in ExamBuilder
41(a) Complete the truth table for the following logic gate.
A B Q
0 0 0
0 1 1
0
1
[4]
(b) The symbol ^ is used for exponentiation.
Give the result of a^b when a = 3 and b = 2.
[1]
© OCR 2024. You may photocopy this page. 99 of 250 Created in ExamBuilder
42(a) Elliott plays football for OCR FC. He wants to create a program to store the results of each football match they
play and the names of the goal scorers. Elliott wants individual players from the team to be able to submit this
information.
The number of goals scored in each football match is held in an array called goals. An example of this array is
shown.
goals = [0, 1, 3, 0, 4, 5, 2, 0, 2, 1]
Complete the following pseudocode for an algorithm to count up how many matches with 0 goals are stored in
the array and then print out this value.
01 nogoalscount = 0
02 for count = 0 to (goals.length-1)
03 if goals[…………………………] == 0 then
04 nogoalscount ……………………………………………………
05 endif
06 next count
07 print(……………………………………………)
[3]
© OCR 2024. You may photocopy this page. 100 of 250 Created in ExamBuilder
(b) Describe two examples of defensive design that should be considered when developing this program.
[4]
© OCR 2024. You may photocopy this page. 101 of 250 Created in ExamBuilder
43(a) Louise writes a program to work out if a number entered by the user is odd or even. Her first attempt at this
program is shown.
[1]
(ii) Give a corrected version of line 05 that fixes the syntax error.
[1]
[1]
(ii) Give a corrected version of line 02 that fixes the logic error.
[1]
© OCR 2024. You may photocopy this page. 102 of 250 Created in ExamBuilder
44(a) A programmer creates an algorithm using a flow chart.
Complete the table to give the output when each of the following set of values are input into the algorithm as X
and Y.
© OCR 2024. You may photocopy this page. 103 of 250 Created in ExamBuilder
Input value of X Input value of Y Output
15 10
6 5
2 3
12 2
[4]
(b) Write this algorithm using pseudocode.
[6]
© OCR 2024. You may photocopy this page. 104 of 250 Created in ExamBuilder
45 Victoria is writing a program using a high level language to display the meaning of computer science acronyms
that are entered. The code for her first attempt at this program is shown below.
01 a = input(“Enter an acronym”)
02 if a == “LAN” then
03 print(“Local Area Network”)
04 elseif a == “WAN” then
05 print(“Wide Area Network”)
06 ……………………………………………………………………………………………
07 ……………………………………………………………………………………………
08 endif
(i) Complete the code above to print out an “unknown” message if any other acronym is entered by the user. [2]
[2]
© OCR 2024. You may photocopy this page. 105 of 250 Created in ExamBuilder
46(a) Using pseudocode, write an algorithm that will use a count-controlled loop to print out the numbers 1 to 10 in
ascending order.
[3]
© OCR 2024. You may photocopy this page. 106 of 250 Created in ExamBuilder
(b) For each of the pseudocode algorithms shown below, tick the appropriate box to show whether they will loop
infinitely or not.
© OCR 2024. You may photocopy this page. 107 of 250 Created in ExamBuilder
47(a) Functions and procedures are both examples of sub programs.
[2]
© OCR 2024. You may photocopy this page. 108 of 250 Created in ExamBuilder
(ii) Describe two benefits to a programmer of using sub programs.
[4]
© OCR 2024. You may photocopy this page. 109 of 250 Created in ExamBuilder
(b) A library gives each book a code made from the first three letters of the book title in upper case, followed by the
last two digits of the year the book was published.
For example, “Poetry from the War”, published in 2012 would be given the code POE12.
(i) Complete the following pseudocode for a function definition that will take in the book title and year as
parameters and return the book code.
© OCR 2024. You may photocopy this page. 110 of 250 Created in ExamBuilder
(ii) Use pseudocode to write an algorithm that does the following :
[6]
© OCR 2024. You may photocopy this page. 111 of 250 Created in ExamBuilder
48(a) A programmer has written an algorithm to output a series of numbers. The algorithm is shown below:
01 for k = 1 to 3
02 for p = 1 to 5
03 print (k + p)
04 next p
05 next k
06 m = 7
07 print m * m
(i) Give the first three numbers that will be printed by this algorithm.
[1]
(ii) State how many times line 03 will be executed if the algorithm runs through once.
[1]
(b) Identify two basic programming constructs that have been used in this algorithm.
[2]
© OCR 2024. You may photocopy this page. 112 of 250 Created in ExamBuilder
(c)
[2]
(ii) Identify two variables that have been used in the algorithm above.
[2]
© OCR 2024. You may photocopy this page. 113 of 250 Created in ExamBuilder
49 OCR town are holding an election with three candidates (A, B and C). An electronic voting booth will be used to
allow people to vote.
© OCR 2024. You may photocopy this page. 114 of 250 Created in ExamBuilder
[6]
© OCR 2024. You may photocopy this page. 115 of 250 Created in ExamBuilder
50(a) The logic diagram below (Fig. 2) shows a system made up of two connected logic gates.
Fig.2
[2]
© OCR 2024. You may photocopy this page. 116 of 250 Created in ExamBuilder
(b) (i) Label the names of the two gates on the diagram above. [2]
(ii) Complete the truth table below to show the output from this logic system.
A B Q
0 0
0 1
1 0
1 1
[4]
51(a) OCR High School uses a computer system to store data about students’ conduct. The system records good
conduct as a positive number and poor conduct as a negative number. A TRUE or FALSE value is also used to
record whether or not a letter has been sent home about each incident.
Fig. 1
© OCR 2024. You may photocopy this page. 117 of 250 Created in ExamBuilder
A single record from this database table is read into a program that uses an array with the identifier
studentdata. An example of this array is shown below:
studentdata = [“Kirstie”, “Homework forgotten”, “–2”, “FALSE”]
Write an algorithm that will identify whether the data in the studentdata array shows that a letter has been
sent home or not for the student. The algorithm should then output either “sent” (if a letter has been sent) or “not
sent” (if a letter has not been sent).
[4]
© OCR 2024. You may photocopy this page. 118 of 250 Created in ExamBuilder
(b) The data shown above in Fig. 1 is stored in a database table called Conduct.
(i) Write an SQL statement to select the StudentName field for all records that have negative Points.
[3]
(ii) State the wildcard that can be used in SQL to show all fields from a table.
[1]
(c) State the most appropriate data type used to store each of the following items of data.
• StudentName
• Points
• LetterSent [3]
© OCR 2024. You may photocopy this page. 119 of 250 Created in ExamBuilder
Mark Scheme
Total 4
Total 6
© OCR 2024. You may photocopy this page. 120 of 250 Created in ExamBuilder
Mark Scheme
Total 2
© OCR 2024. You may photocopy this page. 121 of 250 Created in ExamBuilder
Mark Scheme
4 a One mark per bullet point 4 Award BP4 for implicit closing of file (e.g.
(AO3 2b) using with… in Python)
Ask the user for two inputs and
store/use these Example answer :
Open pilots.txt (for write/append) dronepilotData =
Write both inputs to opened text file open("pilots.txt")
Close text file pilotCode = input("enter code")
dob = input("enter date of
birth")
dronepilotData.writeLine(pilotC
ode, dob)
dronepilotData.close()
ii totalPay 2 totalPay =
(experience, miles) // (miles, (AO3 2c) calculatePay(experience, miles)
experience)
© OCR 2024. You may photocopy this page. 122 of 250 Created in ExamBuilder
Mark Scheme
Total 18
© OCR 2024. You may photocopy this page. 123 of 250 Created in ExamBuilder
Mark Scheme
end function
© OCR 2024. You may photocopy this page. 124 of 250 Created in ExamBuilder
Mark Scheme
b i Boolean has two possible values / True 1 The results are words and not Boolean
or False // Result has three possible (AO2 1a) values.
values // result has more than two
options
ii 1 mark for data type, 1 mark for matching 2 Allow other sensible explanation that
justification. (AO2 1a) shows candidate has considered how each
of the three states could be stored.
String…
…can store "win", "loss" or "draw" //
equivalent
Char…
…can store "W", "L" or "D" // equivalent
Integer / Real…
…can store 0, 1, 2 // equivalent
c number with decimal places / fractional 1 Do not accept examples on their own.
part (AO1 1a)
Total 14
© OCR 2024. You may photocopy this page. 125 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Example answer 1
total = 0
date = input("Please enter
date")
for count = 0 to
events.length-1
if events[0, count] == date
then
total = total +
events[3,count]
© OCR 2024. You may photocopy this page. 126 of 250 Created in ExamBuilder
Mark Scheme
Example answer 2
total = 0
date = input("Please enter
date")
for item in events:
if item[0] == date then
total = total + item[3]
endif
next count
print("There were " + total + "
events on " + date)
Examiner’s Comments
© OCR 2024. You may photocopy this page. 127 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 3
© OCR 2024. You may photocopy this page. 128 of 250 Created in ExamBuilder
Mark Scheme
Example answer
procedure SaveLogs(data,
filename)
logFile = open(filename)
logFile.writeLine(data)
logFile.close()
endprocedure
Examiner’s Comments
© OCR 2024. You may photocopy this page. 129 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 2
c i 1 mark for 1
(AO3 1) Examiner’s Comments
Line 04
Concatenation is the process of joining
strings together. In OCR Exam Reference
Language, this is done using the + symbol.
Line 04 joins together sensorType and
sensorNumber, assigning the
concatenated result to the variable
sensorID.
© OCR 2024. You may photocopy this page. 130 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Misconception
if x == True then…
if x then…
© OCR 2024. You may photocopy this page. 131 of 250 Created in ExamBuilder
Mark Scheme
iv 1 mark from 1
(AO3 1) Examiner’s Comments
Line 01
Line 02 The program code given contains two
Line 03 explicit calls to functions. There is one
Line 05 function call on line 02 for
CheckSensorCode() and one function
call on line 05 for ResetSensor().
However, many programming languages
(including Python) implement input as a
function and so examiners were instructed
to also give credit where candidates
identified lines 01 or 03.
© OCR 2024. You may photocopy this page. 132 of 250 Created in ExamBuilder
Mark Scheme
Example answer 1
if SystemArmed then
if DoorSensorActive then
SoundAlarm()
else if WindowSensorActive
then
SoundAlarm()
endif
endif
Example answer 2
© OCR 2024. You may photocopy this page. 133 of 250 Created in ExamBuilder
Mark Scheme
endif
Example answer 3
if SystemArmed and
(DoorSensorArmed or
WindowSensor) then
SoundAlarm()
endif
if SystemArmed and
DoorSensorArmed or WindowSensor
then
Example answer 4
if SystemArmed and
DoorSensorArmed
SoundAlarm()
else if SystemArmed and
WindowSensorArmed
SoundAlarm()
endif
Examiner’s Comments
© OCR 2024. You may photocopy this page. 134 of 250 Created in ExamBuilder
Mark Scheme
Misconception
if SystemArmed AND
DoorSensorActive OR
WindowSensorActive then
SoundAlarm()
© OCR 2024. You may photocopy this page. 135 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 1
Total 23
© OCR 2024. You may photocopy this page. 136 of 250 Created in ExamBuilder
Mark Scheme
Example answer
score = 0
for count = 1 to 3
num1 = random(1, 10)
num2 = random(1, 10)
ans = input("What is” +num1 +
" + " + num2 + "?")
if ans = num1 + num2 then
score = score + 1
end if
next count
print("You scored " + score)
Examiner’s Comments
© OCR 2024. You may photocopy this page. 137 of 250 Created in ExamBuilder
Mark Scheme
Total 6
© OCR 2024. You may photocopy this page. 138 of 250 Created in ExamBuilder
Mark Scheme
Total 4
© OCR 2024. You may photocopy this page. 139 of 250 Created in ExamBuilder
Mark Scheme
9 a 1 mark for method, 1 mark to max 2 for 6 Validation must be applied to the rules of
each use (4 AO2 the game as given; do not accept uses
1b) related to input not asked for (e.g. names,
e.g. (2 AO1 passwords, etc).
1a)
Range check Do not accept uses that simply repeat the
… checks upper/max / lower/min / name of the check (e.g. “range check,
boundaries checks a range of numbers”)
… make sure the players answer /
input is between sensible limits (e.g. 20 For range check, values must be sensible
or less, between 2 and 20 inclusive) // (e.g. 1 to 50), and allow input of 2 to 20. Do
not negative not allow 1 / 10 (answer could be over
…by example of program code this).
© OCR 2024. You may photocopy this page. 140 of 250 Created in ExamBuilder
Mark Scheme
Misconception
© OCR 2024. You may photocopy this page. 141 of 250 Created in ExamBuilder
Mark Scheme
ii 1 mark for name, 1 mark for matching 2 Allow other sensible descriptive names for
description (1 AO1 testing.
1a)
e.g. (1 AO2 Description must match test type.
1b)
Final / terminal testing… Must be a description and not just an
… Completed at the end of example, but example may support
development / before release. description.
… to test the product as a whole.
Do not accept descriptions that simply
Iterative / incremental testing… repeat type of test without further
…completed during development. clarification (e.g. “boundary, testing the
…after each module is completed. boundary”).
… test module in isolation
Allow :
Normal testing…
…test using data that should be Black box testing…
accepted // …testing without access / knowledge
…test that is expected to work / pass of a system’s workings.
© OCR 2024. You may photocopy this page. 142 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 143 of 250 Created in ExamBuilder
Mark Scheme
iii 1 mark for feature 4 Allow other sensible names for features.
1 mark for matching description (AO2 1b)
e.g. Description must add more than is given in
the identification of the feature to be
Translator / compiler / interpreter … awarded. For example, “keyword
… convert to low-level/machine code highlighting, highlights keywords” is 1 mark
…allow program to be executed / run for the feature only.
…produce executable file (only for
compiler) If compiler and interpreter given as two
…stops execution when error found distinct features, allow both (with suitable
(interpreter only) descriptions). Do not allow translator and
compiler/interpreter.
Run-time environment / output
window… Description must match feature.
…allows program / code to be run /
executed “finding errors” is NE for description of
…shows output of the program / code error reporting.
© OCR 2024. You may photocopy this page. 144 of 250 Created in ExamBuilder
Mark Scheme
Total 14
© OCR 2024. You may photocopy this page. 145 of 250 Created in ExamBuilder
Mark Scheme
10 1 mark each, max 2 if not fully correct 3 Shapes of logic gates must be correct.
circuit. (AO3 2a) NOT gate must include circle for inversion.
No other gates should include circle.
NOT B
AND gate with A / C as one direct AND gates must have two different inputs,
input… NOT gate must have one input. All gates
…Second AND gate with other must have one output.
(unused) A / C as direct input and
output of previous stage as other input Correct system will always have NOT B
and two other AND gates correctly joined.
Fully correct circuit is any of :
Accept alternative systems that produce
Q = (A AND NOT B) AND C the correct output.
Q = A AND (NOT B AND C)
Q = (A AND C) AND NOT B Accept (BOD) three input AND gate for
BP2 and BP3 if used correctly.
See examples below :
OK if inputs/outputs not joined up to
A/B/C/Q as long as intention clear.
Examiner’s Comments
Total 3
© OCR 2024. You may photocopy this page. 146 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Total 2
© OCR 2024. You may photocopy this page. 147 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 148 of 250 Created in ExamBuilder
Mark Scheme
errors satisfactorily.
Total 6
© OCR 2024. You may photocopy this page. 149 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 150 of 250 Created in ExamBuilder
Mark Scheme
e.g.
total = sum(num1, num2)
x = num1 + num2
total = x
Examiner’s Comments
Total 7
© OCR 2024. You may photocopy this page. 151 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
b i Function header for newPrice… 4 BP1 must be clear that a new function is
…taking (at least) two parameters (AO3 2b) being defined. E.g. function / def
…correctly calculates price based on keyword. Allow FT for subsequent marks if
parameters (if present) within function not present.
…/
… returns this calculated price Ignore any code outside attempt at function
definition.
© OCR 2024. You may photocopy this page. 152 of 250 Created in ExamBuilder
Mark Scheme
e.g.
function newPrice(nights,
room)
price = 80 * nights
endif
return price
endfunction
Examiner’s Comments
© OCR 2024. You may photocopy this page. 153 of 250 Created in ExamBuilder
Mark Scheme
e.g.
print(newPrice(“premium”, 5))
x = newPrice(5, “premium”)
print(x)
Examiner’s Comments
© OCR 2024. You may photocopy this page. 154 of 250 Created in ExamBuilder
Mark Scheme
c i Checks that both firstname and 5 Must have some attempt at all three
surname are not empty… (AO3 2a) checks to give output mark(s). Check for
Checks that room is either “basic” or nights must check both upper and lower
“premium”… limits.
Checks that nights is between 1 and
5 (inclusive)… Iteration can be used as validation if input
…Outputs “NOT ALLOWED” (or repeatedly asked for until valid answer
equivalent) if any of the 3 checks are given.
invalid (must check all three)
…Outputs “ALLOWED” (or Do not accept logically incorrect Boolean
equivalent) only if all three checks are conditions such as if firstname or
valid (must check all three) surname == “”
Note : output marks are given for if entire Do not accept ≥ or ≤ for >=, <=. Ignore
system produces the correct output. For capitalisation
example, If a user enters a valid name and
room but an invalid number of nights, the e.g.
system should say “NOT ALLOWED” (or
equivalent). If this works and produces the valid = True
correct response no matter which input is if firstname == “” or surname
invalid, BP4 should be given. == “” then
valid = False
The same process holds for the valid end if
output - if (and only if) three valid inputs if room != “basic” and room !=
results in an output saying “ALLOWED” (or "premium" then
equivalent), BP5 should be given. Do not valid = False
give this if ALLOWED is printed when (for endif
example) two inputs are valid and one is if nights < 1 or nights > 5
invalid. then
valid = False endif
For any output marks to be given, a if valid then
sensible attempt must have been made at print(“ALLOWED”)
all three checks. These may not be else
completely correct (and may have been print(“NOT ALLOWED”)
penalised in BPs 1 to 3) but should be endif
enough to allow the FT marks for output.
BP1 to 3 can check for valid or invalid
inputs. . Pay particular attention to use of
AND / OR. Only give marks for output if
these work together correctly.
© OCR 2024. You may photocopy this page. 155 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
IF room == “basic” or
“premium” is incorrect as the
second part of the statement is not
evaluated against anything. This was
perhaps the most common mistake.
IF room == “basic” or room ==
“premium” is correct and checks for
validity.
IF room == basic or room ==
© OCR 2024. You may photocopy this page. 156 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 3
© OCR 2024. You may photocopy this page. 157 of 250 Created in ExamBuilder
Mark Scheme
Total 17
© OCR 2024. You may photocopy this page. 158 of 250 Created in ExamBuilder
Mark Scheme
next x
print(total)
print(total / num)
Examiner’s Comments
© OCR 2024. You may photocopy this page. 159 of 250 Created in ExamBuilder
Mark Scheme
Total 6
© OCR 2024. You may photocopy this page. 160 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 161 of 250 Created in ExamBuilder
Mark Scheme
iii SELECT FirstName, Surname, 4 Order of fields for BP1 not important but
Nights, Room, StayComplete // (AO3 1) must show all fields and be separated by
SELECT* (AO3 2c) commas.
FROM TblBookings
WHERE Ignore capitalisation and spacing. Spelling
Nights > 1 // Nights >= 2 // must be correct. Ignore quotes around
Nights BETWEEN 2 AND 5. numeric values or field/table names.
Examiner’s Comments
Total 7
© OCR 2024. You may photocopy this page. 162 of 250 Created in ExamBuilder
Mark Scheme
17 Any two bullet points for one mark each: 2 Do not accept indentation (no code to
(AO2 1b) sensibly indent in this example)
Add comments
Name variables sensibly “Use a subroutine” is not enough. Must be
Put into subroutine / procedure / clear that existing code will be put into a
function new subroutine.
Use loop / iteration
Examiner’s Comments
Total 2
© OCR 2024. You may photocopy this page. 163 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Total 2
© OCR 2024. You may photocopy this page. 164 of 250 Created in ExamBuilder
Mark Scheme
Conditions Outcome
Not Saturday and Half price
(either a student or
has a discount
card).
Saturday or (not a Full price
student and doesn’t
have a discount
card). Question asks for a flowchart. Answers as
pseudocode, high level language or other
Saturday Student Discount Outcome forms are not acceptable 9 (NAQ).
Card
N N N Full price BP 4 and 5 only to be awarded if all
N N Y Half price decisions ensure correct output and clear
what the decisions are . FT for incorrect
N Y N Half price
shapes used or no inputs as long as
N Y Y Half price decisions are logically correct. Must
Y N N Full price attempt all three decisions.
Y N Y Full price
Allow calculation of half price / full price
Y Y N Full price instead of message but this must still be
Y Y Y Full price output.
© OCR 2024. You may photocopy this page. 165 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 166 of 250 Created in ExamBuilder
Mark Scheme
b Number of people (at the table) // 2 Ignore additional inputs that would be
whether there are more than 5 people (AO32a) sensible, such as cost of the meal.
or not
Choice between percentage and value Accept inputs in form of pseudocode / high-
// actual value of both percentage, level language.
value
Max 1 if other irrelevant inputs given.
Examiner’s Comments
© OCR 2024. You may photocopy this page. 167 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
ii To show all possible inputs (to the logic 2 For 2nd BP, must be clear that the output is
circuit)… (AO1 1b) linked to the input values given.
…and the associated/dependent output
(for each input) “All possible combinations of inputs and
outputs” gains the first mark (all possible
inputs) but not the second.
© OCR 2024. You may photocopy this page. 168 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Misconception
Exemplar 1
Total 13
© OCR 2024. You may photocopy this page. 169 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 170 of 250 Created in ExamBuilder
Mark Scheme
OCR Reference Selecti Iteratio Accept any response (ticks, crosses, etc)
Language code on n that clearly indicates candidate’s choice.
for i = 1 to 10 ✓
print(i)
Examiner’s Comments
next i
whilescore != 0 ✓
Candidates appeared to struggle with this
playgame() question. In particular the use of
switch/case was not well understood. This
endwhile may be because some high-level
if playerHit() ✓ languages such as Python have not
then traditionally supported this. The recent
update to Python 3.10 introduces this
score = 0 construct. Centres who use Python may
want to consider upgrading their
endif installation to allow practical
implementation of the switch/case
switch bonus: ✓
construct.
case 0:
score = 9
case 1:
score = 7
case 2:
score = 5
endswitch
Total 5
© OCR 2024. You may photocopy this page. 171 of 250 Created in ExamBuilder
Mark Scheme
b i Parameter values outside index range / 1 Answer must refer to either array or
larger than 4 / smaller than 0 // -1, 16 is gameboard / grid / block
not a valid block
d Function call Returned value 3 Do not accept “blank” or any other returned
value for third call.
checkblock(2,1) B
checkblock(3,0) A Ignore case and spelling as long as
checkblock(2,3) FREE recognisable.
Total 14
© OCR 2024. You may photocopy this page. 172 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 173 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
This question was asked candidates to use
string manipulation to output specific words
or sentences from given values. The mark
scheme given shows answers using
substring() which is the method given
in the specification pseudocode guide.
Misconception
b i 16 1
ii 2 1
iii 9 1
© OCR 2024. You may photocopy this page. 174 of 250 Created in ExamBuilder
Mark Scheme
Total 6
© OCR 2024. You may photocopy this page. 175 of 250 Created in ExamBuilder
Mark Scheme
23 a i Count = 0 5
Output Count
All non-decision boxes and YES from
decision boxes linked in a sequential
fashion from Start to End.
NO from first decision box linked to
skip over increment of count
NO from second decision box linked
back to INPUT
Examiner’s Comments
© OCR 2024. You may photocopy this page. 176 of 250 Created in ExamBuilder
Mark Scheme
AfL
Examiner’s Comments
This question utilised similar understanding
to this part, but utilised the loop in a
different way.
© OCR 2024. You may photocopy this page. 177 of 250 Created in ExamBuilder
Mark Scheme
AfL
b i Number with a decimal / fractional part 2 One mark for definition, one mark for
Suitable example (e.g. 17.24) example
Do not accept float as definition
Allow fractions as example
ii Whole number // number with no 2 One mark for definition, one mark for
decimal / fractional part example
Suitable example (e.g. 17)
© OCR 2024. You may photocopy this page. 178 of 250 Created in ExamBuilder
Mark Scheme
Misconception
Total 20
© OCR 2024. You may photocopy this page. 179 of 250 Created in ExamBuilder
Mark Scheme
Total 6
© OCR 2024. You may photocopy this page. 180 of 250 Created in ExamBuilder
Mark Scheme
Example algorithm
present=0
absent=0
for i = 0 to (studentnames.length) -1
print(studentnames[i])
attendance=input("absent or present?")
if attendance=="present" then
present=present+1
else
absent=absent+1
endif
next i
Examiner’s Comments
Question (c) asked candidates to write an
algorithm to:
© OCR 2024. You may photocopy this page. 181 of 250 Created in ExamBuilder
Mark Scheme
AfL
OCR support
© OCR 2024. You may photocopy this page. 182 of 250 Created in ExamBuilder
Mark Scheme
Total 6
B AND C AO1
OR gate with two inputs, one of which 1b(3)
is A
…correct connection of these two
gates with no additional gates /
connections
b i 3 1 CAO
AO1
1b(1)
ii 1 1 CAO
AO1
1b(1)
Total 9
© OCR 2024. You may photocopy this page. 183 of 250 Created in ExamBuilder
Mark Scheme
e.g.
newstate = input("Enter the new state : ")
statevalue = 1
statevalue = 2
statevalue = 3
else
print("Invalid state")
endif
Examiner’s Comments
Question (f) asked candidate to rewrite an
algorithm that used switch/case to
perform the same actions but using IF
statements. It was clear that many
candidates did not understand the use of
switch/case. Some languages (such as
Python) do not include support for these. It
is important that these constructs are still
taught.
OCR support
© OCR 2024. You may photocopy this page. 184 of 250 Created in ExamBuilder
Mark Scheme
https://www.ocr.org.uk/images/225975-spe
cification-accredited-gcse-computer-
science-j276.pdf
Misconception
© OCR 2024. You may photocopy this page. 185 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Question (c) asked candidates to draw
flowchart and this was done particularly
well. Many candidates changed the given
pseudocode algorithm into a well-defined
process that covered the same steps as
the pseudocode.
© OCR 2024. You may photocopy this page. 186 of 250 Created in ExamBuilder
Mark Scheme
ii Comments 1
Use of constants
AO2
1b(1)
e i 1 mark per bullet to max 2 e.g. 2 Allow two any suitable examples for two
marks
Check the program meets the user AO1
requirements 1b(2) BOD “find errors”, “find bugs” for BP2
Check the program works (as
intended) // detect logic / syntax errors “fix errors” by itself is one mark (BP4)
Check the program does not crash
(under invalid entry) // check error
messages are suitable
…allow these errors to be fixed
…make sure there are no problems
when released
Any suitable example related to the
vending machine e.g. gives correct
change
ii 1 mark per bullet to max 2 2 Do not accept just “repeatedly testing” for
iterative
Iterative is during development // AO1
repeatedly testing after/while making 1b(2) BOD “iterative testing tests
changes modules/sections”
Final is when the development is
(almost) complete // done after iterative
testing
© OCR 2024. You may photocopy this page. 187 of 250 Created in ExamBuilder
Mark Scheme
iii Code Money Expected result 3 For £0.49 accept any value <£0.50. Must
entered inserted be a specific value, not a description.
AO3
2b(3) Accept any suitable error message for
invalid selection
C2
£0.49
(or any
value less
that £0.50)
Invalid
Selection
(or any suitable
error message)
Total 22
Misconception
Total 4
© OCR 2024. You may photocopy this page. 188 of 250 Created in ExamBuilder
Mark Scheme
ii Taking firstname, surname and teacher 6 1 mark for each correct bullet to a
or student as input (AO3 2b) maximum of 6.
Checking IF role is teacher/student
(using appropriate selection) If used, a flowchart should represent the
For teacher ...Generating last 3 letters bulleted steps in the answer column.
of surname using appropriate string
manipulation
...Generating first 2 of letters of
firstname and adding to previous
For student.... correctly calculating as
before
Correct concatenation and output
e.g.
Ask the user to input the data, store in
variables firstname, surname and role.
Check whether the role entered is teacher.
If it is, join the right 3 most letters in
surname with the left 2 letters in firstname.
Store this in username.
If it is not teacher, join the left 3 letters from
firstname with the left 2 letters from
surname. Store this in username. Output
the value in username.
Total 8
© OCR 2024. You may photocopy this page. 189 of 250 Created in ExamBuilder
Mark Scheme
Total 9
Total 3
© OCR 2024. You may photocopy this page. 190 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 191 of 250 Created in ExamBuilder
Mark Scheme
iii asks for price and discount code to be 6 High-level programming language / OCR
input Exam Reference Language response
…passes both to the checkdiscount() required
function as parameters…
...stores / uses returned value Do not accept pseudocode / natural
calculates total of all prices language.
entered/returned
repeats until 0 is entered as price BP3 allow total of prices entered as FT if
outputs calculated total candidate does not achieve BP2
e.g.
total = 0
do
price = input("Enter a
price")
code = input("Enter a
discount code")
newprice =
checkdiscount(price, code)
total = total + newprice
until price == 0
print(total)
alternative example
total = 0
price = 1
while price != 0
price = input("Enter a
price")
code = input("Enter a
discount code")
total = total +
checkdiscount(price, code)
endwhile
print(total)
© OCR 2024. You may photocopy this page. 192 of 250 Created in ExamBuilder
Mark Scheme
alternative example
© OCR 2024. You may photocopy this page. 193 of 250 Created in ExamBuilder
Mark Scheme
e.g.
price = input("enter price")
if price > 200 then
price = price – 40
elseif price > 100 then
price = price - 20
endif
print(price)
d One mark per correct choice 3 Accept other markings that indicate a
choice has been made (e.g. a cross, etc)
SELECT ItemCode, ItemName
FROM tblStock
WHERE Price >=60
Total 30
© OCR 2024. You may photocopy this page. 194 of 250 Created in ExamBuilder
Mark Scheme
Total 6
© OCR 2024. You may photocopy this page. 195 of 250 Created in ExamBuilder
Mark Scheme
Total 7
© OCR 2024. You may photocopy this page. 196 of 250 Created in ExamBuilder
Mark Scheme
35 i 1 mark per bullet, max 4 5 BP2 and 3 must check for both ends of
range – must check that input data is not
Miles and age input separately negative.
Checks for valid mileage
Checks for valid age Allow FT for BP4 if already penalised
Checks both are greater than / greater under BP2 and/or 3 and output is
than equal to zero otherwise correct.
…correctly outputs both True and
False e.g.
Total 9
© OCR 2024. You may photocopy this page. 197 of 250 Created in ExamBuilder
Mark Scheme
C e.g.
A
D/F
F/D
Total 4
© OCR 2024. You may photocopy this page. 198 of 250 Created in ExamBuilder
Mark Scheme
37 a 1 mark per bullet 4 Mark test data first, both must meet
(AO3 2c) different criteria. Then mark output for
Test data either 0 or less characters, or each.
20 or more characters
Stating correct output
Test data between 1 and 19 characters
(inc)
Stating correct output
Output
Number of minutes
finalTotal = totalMins(hours,
minutes)
print (finalTotal)
function
totalMins(hours,minutes)
return total
endfunction
© OCR 2024. You may photocopy this page. 199 of 250 Created in ExamBuilder
Mark Scheme
iii Takes input from the user 4 High-level programming language / OCR
Compares if input is larger than 120… (AO3 2b) Exam Reference Language response
…if true, outputs "You played required
games for too long!"
…if false, outputs "You are under Do not accept pseudocode / natural
your time limit!" English.
© OCR 2024. You may photocopy this page. 200 of 250 Created in ExamBuilder
Mark Scheme
d Initialises total as 0 and prints out total 4 High-level programming language / OCR
the end (as per original program) (AO3 2c) Exam Reference Language response
Uses iteration, e.g. FOR, WHILE required
…that repeats 5 times
…correctly adds up values using loop Do not accept pseudocode / natural
index English.
e.g.
total = 0;
for (int x = 0; x <= 4; x++){
total = total +
hoursplayed[2][x];
}
System.out.println (total);
© OCR 2024. You may photocopy this page. 201 of 250 Created in ExamBuilder
Mark Scheme
Real (1)…
Total 31
© OCR 2024. You may photocopy this page. 202 of 250 Created in ExamBuilder
Mark Scheme
E.g
Comments/annotation…
…E.g. any relevant example, such as
line 4 checks the input is valid
Indentation…
…E.g. indenting within IF statement
Using constants…
…E.g. π
Total 9
e.g.
compare to wind
compare to zebra
Total 8
© OCR 2024. You may photocopy this page. 203 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 204 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 205 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 6
b i 1 mark per bullet to max 2 2 The variable records whether a swap has
AO2 1b taken place; it does not perform the swap.
Flag / record whether a swap has (2)
taken place or not Examiner’s Comments
checked as condition to decide
whether to repeat This question presented candidates with
an algorithm for a bubble sort and asked
them to explain the purpose of the Boolean
value swaps.
© OCR 2024. You may photocopy this page. 206 of 250 Created in ExamBuilder
Mark Scheme
Misconception
Exemplar 5
© OCR 2024. You may photocopy this page. 207 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 208 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 209 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 210 of 250 Created in ExamBuilder
Mark Scheme
Misconception
© OCR 2024. You may photocopy this page. 211 of 250 Created in ExamBuilder
Mark Scheme
example algorithm
function ticketprice(numadult,
numchild)
price = (numadult * 19.99) +
(numchild * 8.99) + 2.50
return price
end function
© OCR 2024. You may photocopy this page. 212 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Misconception
Exemplar 3
© OCR 2024. You may photocopy this page. 213 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 4
© OCR 2024. You may photocopy this page. 214 of 250 Created in ExamBuilder
Mark Scheme
Total 28
© OCR 2024. You may photocopy this page. 215 of 250 Created in ExamBuilder
Mark Scheme
Total 5
© OCR 2024. You may photocopy this page. 216 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
b 1 mark per bullet, mark in pairs. Max 2 per 4 Mark first answer only in each section
point. AO2 1a
(2) For validation, allow one example of a type
e.g. AO2 1b of validation (e.g. type check, range check)
(2)
Input sanitisation e.g. question so allow other sensible
…cleaning up input data / removing examples such as audit logging, encryption
unwanted data of data
…by example (e.g. removing special
characters / preventing SQL injection) Do not allow “data is correct” as expansion
for validation – validation checks that data
Validation is sensible or follows rules, NOT that it is
…checking whether input data should correct.
be allowed / is sensible / follows criteria
…by example (e.g. goals cannot be Planning for contingencies and anticipating
© OCR 2024. You may photocopy this page. 217 of 250 Created in ExamBuilder
Mark Scheme
Misconception
Total 7
© OCR 2024. You may photocopy this page. 218 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 2
AfL
© OCR 2024. You may photocopy this page. 219 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 220 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Total 4
© OCR 2024. You may photocopy this page. 221 of 250 Created in ExamBuilder
Mark Scheme
44 a 1 mark per bullet to max 4, 1 mark per row 4 Correct Answer Only
AO2 1b
10 (4) Do not accept “X”, “Y”, etc.
6
6 Examiner’s Comments
2
This question required candidates to follow
through the given algorithm and decide on
the value that would be output given a set
of input values.
© OCR 2024. You may photocopy this page. 222 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 223 of 250 Created in ExamBuilder
Mark Scheme
place.
Exemplar 1
Total 10
© OCR 2024. You may photocopy this page. 224 of 250 Created in ExamBuilder
Mark Scheme
45 1 mark per bullet, max 2. 2 Accept logically correct equivalents for else
(e.g. elseif a!=“LAN“ and/or a
!=“WAN“). Do not allow elseif on its
else own
print (“unknown”)
Accept other keywords for print (e.g.
“output”) as long as the intention is clear.
Examiner’s Comments
Misconception
To compare the contents of a variable
against two possible values, it is incorrect
to use :
• if a!=‘WAN’ or ‘LAN’
In the example above, the comparison of a
against ‘WAN’ is logically correct, but it is
unclear what ‘LAN’ is being compared
against.
A logically correct way to achieve the same
thing would be :
• if a!=‘WAN’ and a!=‘LAN’
© OCR 2024. You may photocopy this page. 225 of 250 Created in ExamBuilder
Mark Scheme
aimed at humans//understandable by
humans / programmers Do not award marks for naming languages
English like structure / syntax such as Java , Python, etc.
Must be
translated/compiled/interpreted (before
it can be run) Do not award marks for stating what a high
Allows programmer to deal with the level language isn’t (i.e. describing what
problem instead of considering the low level code is).
underlying hardware // an abstraction
from the hardware // hardware Do not allow “easy to use”
independent // portable
Do not allow ‘has to be converted’ without
into what i.e machine code etc.
Examiner’s Comments
Total 4
© OCR 2024. You may photocopy this page. 226 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 227 of 250 Created in ExamBuilder
Mark Scheme
Total 7
© OCR 2024. You may photocopy this page. 228 of 250 Created in ExamBuilder
Mark Scheme
47 a i 1 mark per bullet, max 2. 2 Allow “does not” for second mark if
intention is clear (ie if it is obvious that the
“not” refers to not returning a value).
Function returns a value
Procedure does not return a value Allow discussion of how returned value in a
function can be used (e.g. to assign to a
variable or to use this returned value in
some way).
ii 1 mark per bullet, max 4. Mark in pairs. 4 Maximum of two benefits with expanstions
to be marked as per question.
e.g.
Reuse code (in different programs) Allow “can be called multiple times”
…quicker to develop (new) programs
…build on existing work / use of a Allow “file size is smaller”.
library of subroutines
Do not allow “more efficient” without further
Avoid repetition of code (in the same explanation.
program)
…makes program shorter / smaller
… subprogram called instead of
copying/pasting. Examiner’s Comments
… quicker to develop (new) programs
Although candidates had struggled on the
Easier to maintain previous questions to demonstrate that
…as code is easier to understand/read they could use functions, a much larger
…as code is shorter number were able to describe why
subprograms such as functions are
Easier to debug beneficial. This demonstrates that
…as code is shorter candidates do understand this in theory but
…same bugs will not have been copied may not perhaps have had the practical
to other areas of the program. programming time in lessons to apply this
on screen. For example, a common correct
Work can be split up in a team answer frequently given was that code did
not have to be copied and pasted multiple
…to suit developers’ skill set times but could instead be called from
…to work on different subprogram at other parts of the program, but candidates
the same time / develop separately then did exactly the opposite of this when
asked to use a function themselves.
Allows for abstraction / removes
complexity A good number of candidates were also
…subprograms can be used by able to describe other potential benefits,
© OCR 2024. You may photocopy this page. 229 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 230 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 231 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 232 of 250 Created in ExamBuilder
Mark Scheme
Misconception
Functions modularise code; they can be
written once and used multiple times in a
program. If a pre-written function is given
as part of a question and candidates are
told to use it, they will NOT be credited for
simply copying and pasting the code inside
the function to use; this shows a lack of
understanding.
© OCR 2024. You may photocopy this page. 233 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 3
Exemplar 4
© OCR 2024. You may photocopy this page. 234 of 250 Created in ExamBuilder
Mark Scheme
Total 15
© OCR 2024. You may photocopy this page. 235 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
ii 15 1 Accept 3 × 5
Examiner’s Comments
© OCR 2024. You may photocopy this page. 236 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 237 of 250 Created in ExamBuilder
Mark Scheme
c i 1 mark per bullet, max 2 2 Do not accept “will change” for bullet point
4.
Examiner’s Comments
© OCR 2024. You may photocopy this page. 238 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
Total 8
© OCR 2024. You may photocopy this page. 239 of 250 Created in ExamBuilder
Mark Scheme
© OCR 2024. You may photocopy this page. 240 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 241 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 6
© OCR 2024. You may photocopy this page. 242 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 7
Total 6
© OCR 2024. You may photocopy this page. 243 of 250 Created in ExamBuilder
Mark Scheme
50 a 1 mark per bullet, max 2 2 First mark can be awarded if candidate has
either a NOT gate from B, or an OR gate
with two inputs anywhere in their answer.
© OCR 2024. You may photocopy this page. 244 of 250 Created in ExamBuilder
Mark Scheme
AND / conjunction
NOT / negation
Examiner’s Comments
Total 8
© OCR 2024. You may photocopy this page. 245 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
© OCR 2024. You may photocopy this page. 246 of 250 Created in ExamBuilder
Mark Scheme
Exemplar 1
Exemplar 2
© OCR 2024. You may photocopy this page. 247 of 250 Created in ExamBuilder
Mark Scheme
b i 1 mark per bullet, max 2 if not in correct 3 Capitalisation does not affect the mark.
order or additional statements given. Spellings of fields, tables must be correct.
Examiner’s Comments
© OCR 2024. You may photocopy this page. 248 of 250 Created in ExamBuilder
Mark Scheme
Examiner’s Comments
SQL coverage
Appendix 5f of the specification lists all of
the SQL keywords and wildcards that
candidates are required to understand.
This is available from http://www.ocr.org.uk
© OCR 2024. You may photocopy this page. 249 of 250 Created in ExamBuilder
Mark Scheme
c 1 mark per bullet, to max 3 3 Accept text / varchar for string. Do not
accept character.
Do not accept number/numeric for integer
String Accept yes/no, true/false for Boolean.
Integer / Int
Boolean
Examiner’s Comments
Total 11
© OCR 2024. You may photocopy this page. 250 of 250 Created in ExamBuilder