Mark Scheme June 2024 (J27702)
Mark Scheme June 2024 (J27702)
Computer Science
It is also responsible for developing new specifications to meet national requirements and the
needs of students and teachers. OCR is a not-for-profit organisation; any surplus made is
invested back into the establishment to help towards the development of qualifications and
support, which keep pace with the changing needs of today’s society.
This mark scheme is published as an aid to teachers and students, to indicate the requirements
of the examination. It shows the basis on which marks were awarded by examiners. It does not
indicate the details of the discussions which took place at an examiners’ meeting before marking
commenced.
All examiners are instructed that alternative correct answers and unexpected approaches in
candidates’ scripts must be given marks that fairly reflect the relevant knowledge and skills
demonstrated.
Mark schemes should be read in conjunction with the published question papers and the report
on the examination.
© OCR 2024
2. Make sure that you have read and understood the mark scheme and the question paper for this unit. These are posted on the RM Cambridge
Assessment Support Portal http://www.rm.com/support/ca
3. Log-in to RM Assessor and mark the required number of practice responses (“scripts”) and the number of required standardisation responses.
YOU MUST MARK 10 STANDARDISATION RESPONSES BEFORE YOU CAN BE APPROVED TO MARK LIVE SCRIPTS.
MARKING
1. Mark strictly to the mark scheme.
3. The schedule of dates is very important. It is essential that you meet the RM Assessor 50% and 100% (traditional 40% Batch 1 and 100% Batch 2)
deadlines. If you experience problems, you must contact your Team Leader (Supervisor) without delay.
4. If you are in any doubt about applying the mark scheme, consult your Team Leader by telephone or the RM Assessor messaging system, or by email.
2
J277/02 Mark Scheme June 2024
Multiple Choice Question Responses
When a multiple choice question has only a single, correct response and a candidate provides two responses (even if one of th ese responses is correct),
then no mark should be awarded (as it is not possible to determine which was the first response selected by the candidate).
When a question requires candidates to select more than one option/multiple options, then local marking arrangements need to ensure consistency of
approach.
Contradictory Responses
When a candidate provides contradictory responses, then no mark should be awarded, even if one of the answers is correct.
Short Answer Questions (requiring only a list by way of a response, usually worth only one mark per response)
Where candidates are required to provide a set number of short answer responses then only the set number of responses should be marked. The
response space should be marked from left to right on each line and then line by line until the required number of r esponses have been considered. The
remaining responses should not then be marked. Examiners will have to apply judgement as to whether a ‘second response’ on a line is a development
of the ‘first response’, rather than a separate, discrete response. (The underlying assumption is that the candidate is attempting to hedge their bets
and therefore getting undue benefit rather than engaging with the question and giving the most relevant/correct responses.)
Short Answer Questions (requiring a more developed response, worth two or more marks)
If the candidates are required to provide a description of, say, three items or factors and four items or factors are provide d, then mark on a similar basis
– that is downwards (as it is unlikely in this situation that a candidate will provide more than on e response in each section of the response space.)
6. Always check the pages (and additional objects if present) at the end of the response in case any answers have been continued there. If the candidate
has continued an answer there, then add a tick to confirm that the work has been seen.
3
J277/02 Mark Scheme June 2024
Team Leaders must confirm the correct use of the NR button with their markers before live marking commences and should check this when
reviewing scripts.
8. The RM Assessor comments box is used by your team leader to explain the marking of the practice responses. Please refer to these comments
when checking your practice responses. Do not use the comments box for any other reason.
If you have any questions or comments for your team leader, use the phone, the RM Assessor messaging system, or e-mail.
9. Assistant Examiners will send a brief report on the performance of candidates to their Team Leader (Supervisor) via email by the end of the marking
period. The report should contain notes on particular strengths displayed as well as common errors or weaknesses. Constructive critic ism of the
question paper/mark scheme is also appreciated .
4
J277/02 Mark Scheme June 2024
11. Annotations
Annotation Meaning
Omission mark
Cross
Repeat
Tick
Too vague
Blank pages, pages with no annotation, no attempt to answer the question, page seen on QER
5
J277/02 Mark Scheme June 2024
Annotating scripts:
• Blank pages at the start of the script need SEEN annotation
• Any questions answered elsewhere (e.g. on the first blank pages, separately on the page) need to be linked within RM Assessor
and annotated with ticks/crosses/SEEN as appropriate
• 1 tick for every mark awarded, if a question is given 3 marks there must be 3 ticks.
• A BOD or FT annotation needs to be accompanied by a tick
• Any answers with no candidate response need a SEEN annotation and NR entered as the mark.
• Any questions where the candidate has not attempted the question e.g. answered 'don't know' need a SEEN annotation and NR
entered as the mark.
• All questions must be annotated throughout the marking process.
6
J277/02 Mark Scheme June 2024
for ✓
while ✓
7
J277/02 Mark Scheme June 2024
2 • Correct shape for all three inputs AND outputs (parallelogram) 4 No need for arrows – lines
• Correct shape for decision (diamond) (AO2) are acceptable.
• True and False // Yes and No labelled correctly (true/Yes linking to “Even”)
• All lines joined up correctly and link to End. BOD for correct answers
that include a loop back to
the start
8
J277/02 Mark Scheme June 2024
3 (a) Max 1 mark for definition that is clearly different from a logic error. 2 BOD code/program etc for
• (an error that) breaks the rules/grammar of the programming language (AO1) BP1
• Stops the program from running // does not allow program to run // crashes
the program // does not allow program to translate Do not allow answers linked
to data types.
Suitable example for 1 mark, e.g.
• misspelling key word (e.g. printt instead of print) "incorrect grammar" by itself
• Missing / extra symbol (e.g. missing bracket, missing semicolon) is NE
• Mismatched quotes
• Invalid variable or function names (e.g. variable starting with a number or Do not allow “stop working”,
"does not work", etc – TV.
including a space)
• Incorrect use of operators
Do not accept missing
• Use of reserved keywords for variables (e.g. print = 3)
quotation marks e.g.
• Incorrect capitalisation of keywords (e.g. Print instead of print)
print(hello) (could be a
• Incorrect indentation (of code blocks) variable name)
• Missing concatenation (e.g. print(score x) )
BOD given code that could
cause a syntax error in a
high-level language.
9
J277/02 Mark Scheme June 2024
3 (b) 1 mark each 4 Allow other logical
• line 03 (AO3) corrections that will fix the
• total = num1 + num2 problem identified and does
not introduce any further
• Line 04 errors.
• if total >= 10 and total <=20 then
Allow descriptions of
Allow other logical equivalent code e.g. changes as long as clear
total = int(num1) + int(num2) exactly what will change.
if 10 <= total <= 20 Do not allow ambiguous
descriptions of changes to
code.
Ignore capitalisation.
10
J277/02 Mark Scheme June 2024
(ii) • Data must be sorted / in order 1
(AO1)
11
J277/02 Mark Scheme June 2024
4 (b) Only 1 method asked for. Could be name and description/example or description 2 Allow validation / input
and example (AO1) sanitisation / passwords as
• Authentication expansion of anticipating
• …checking users allowed to access the site / know identity of users misuse.
• … by example (e.g. username and password)
• Anticipating misuse // preventing misuse Allow mark for description
• ….stopping the user breaking / hacking into the system with no / incorrect name
• …by example (e.g. restricting entry to integers)
• Validation Allow any 2 points from
mark scheme as long as
• …check / only allow sensible data to be entered / check data is sensible
clearly linked to a single
• …by example (e.g. restrict ratings to 1 to 10 / presence check / format check)
defensive design method.
• Input sanitisation
• …removing invalid/special characters
• …by example (e.g. remove quotation marks / semicolons)
• Maintainability
• ...ensuring program is able to be understood by others
• ...by example (e.g. modularisation / comments)
12
J277/02 Mark Scheme June 2024
5 (a) 1 mark per group of 2 rows 4 Accept True / False etc.
(AO2)
A B C P
0 0 0 0
1 mark
0 0 1 1
0 1 0 0
1 mark
0 1 1 1
1 0 0 0
1 mark
1 0 1 1
1 1 0 1
1 mark
1 1 1 1
13
J277/02 Mark Scheme June 2024
5 (b) 1 mark each 3 Max 2 if not logically
• NOT A (AO3) correct or any additional
• B OR C / missing gates.
• AND gate with two inputs
Shapes of gates must
be correct with correct
number of inputs. Ignore
annotation of gate
names.
14
J277/02 Mark Scheme June 2024
6 (a) 1 mark for each output 3 Case must be correct
(AO2) but BOD if ambiguous.
print(message.upper) ABCD1234 (upper case)
Allow quotation marks in
print(message.left(4)) abcd (lower case) answer.
print(int(message.right(4))*2) 2468
Reasonable attempt at
BP2 needed to access
BP3.
15
J277/02 Mark Scheme June 2024
7 (a) 1 mark each to max 2 2 "More efficient" by itself
• (machine code) does not need to be translated / compiled / interpreted (AO1) is TV.
• Direct control of hardware / memory
• Faster execution time Mark first answer on
• Code can be optimised / shorter code / use less memory each line.
• Can program for specific hardware
• Assembly language is fast to translate. BP6 relates to
Assembly language
being a one-to-one
direct mapping to
machine code.
7 (b) 1 mark each to max 3 3 Allow in reverse (e.g.
• Can produce an executable file (AO1) “interpreter translates
• program/code runs/executes faster (than interpreted version) every time”)
• end users do not need translator
• Can be run again/multiple times without re-translating // only needs to Do not allow "no access
translate once to source code" unless
• End users have no access to source code // distributed with no source clearly talking about end
code... user. Allow if in context
• …cannot steal/copy/modify code/program of distribution.
• Shows all/multiple errors // shows errors at the end (of compilation) //
creates error file Do not allow
descriptions of how a
• Compiler can optimise the code
compiler translates (e.g.
"translates whole code
in one go")
“Faster / quicker” by
itself is TV
16
J277/02 Mark Scheme June 2024
8 (a) 2 marks max per group 4 Do not accept "what
• Meaningful identifiers // meaningful variable names (AO2) variables do" – incorrect
• ...to describe/show what they store // purpose of variable verb, variables
• An example of a meaningful variable identifier for this algorithm store/hold data.
Allow whitespace /
• Use of constants
blank lines (same
• ...to store data that will not change (during program execution) // so data can
expansions as
be changed in one place only
comments)
• An example of a constant for this algorithm (e.g. store 512 as a constant)
Do not award expansion
without being clear
which method is being
discussed. “Makes it
easier to understand” by
itself is TV.
17
J277/02 Mark Scheme June 2024
8 (b) 1 mark each to max 6 6 Allow else for BP3/4
• Appropriate use of both parameters and no additional inputs / (AO3) (validated in question 8a)
incorrect overwrites that affect outcome of algorithm
• Attempt at selection… Allow <=, >= and equivalents
(e.g. <= 0) for BP5.
• …correctly checking if direction is "left" and subtracting 5 from
position (or equivalent) Do not award BP5 if before
• …correctly checking if direction is "right" and adding 5 to position BP3 and 4 (otherwise will
(or equivalent) alter position value)
• Ensuring position (or equivalent) is between 1 and 512 inclusive
• Returning the updated position BP6 only to be given if
attempt made at calculating
new position. Calculation can
Example
if direction == "left" then be partial/incorrect.
position = position - 5
Ignore repeat of function
elseif direction == "right" then
header / end.
position = position + 5
endif Accept flowchart / structured
English but must not just
if position < 1 then repeat the question.
position = 1
elseif position > 512 then If response uses loop to
position = 512 incorrectly change position
endif multiple times, do not award
BP1 (incorrect overwrite)
return position
For minor syntax errors (e.g.
missing quotation marks or ==
for assignment, spaces in
variable names) penalise
once then FT.
18
J277/02 Mark Scheme June 2024
Section B
Ignore capitalisation.
19
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
(b) • javelinThrow set to 14.3 on line 01 and yearGroup set 4 Max 3 if in wrong order or additional
to 10 on line 02 (AO3) (incorrect) changes. Penalise line
• score set to 2 on line 06 numbers once then FT.
• score set to 4 on line 11
• "The score is 4" output on line 13 with no additional Allow FT for BP4 for current value of
outputs (allow input statements) score.
Example
BP4 must not include comma. Ignore
superfluous spaces. Ignore quotation
marks.
20
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
(c) (i) • inputs a value from the user and stores/uses 4 Answers using AND/OR for BP2 and BP3
• checks min value (>= 40.0 // < 40) (AO3) must be logically correct e.g. if
• checks max value (<=180.0 // > 180) height >=40 and height <=180.
• …outputs both valid / not valid correctly based on checks Do not accept if height >=40 and
<=180
Example 1 (checking for valid input)
h = input("Enter height jumped") Answers using OR will reverse output for
if h >= 40 and h <= 180 then BP4 (see examples).
print("valid")
else BP4 needs reasonable attempt at either
print("not valid") BP2 or BP3. Need to be sure what is
endif being checked to be able to decide
which way around valid/invalid should
Example 2 (checking for invalid input) be.
h = input("Enter height jumped")
if h < 40 or h > 180 then Allow FT for BP4 if reasonable attempt at
validating (must include at least one
print("not valid")
boundary)
else
print("valid")
Ignore conversion to int on input. input
endif
cannot be used as a variable name.
21
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
(c) (ii) • Any normal value (between 40 and 180 inclusive) 3 No need to include decimals, e.g.
• 40.0 // 180.0 (AO3) accept 50. Ignore cm if given.
• Any value less then 40 // any value greater that 180 // any
non-numeric value Answer must be actual data (e.g. 50)
and not description of data (e.g. "a
value between 40 and 180"). If
descriptions given, do not accept this
as non-numeric for BP3
(d) • TeamName only in first space 4 Max 3 if not in correct order / includes
• TblResult in second space (AO3) other logical errors.
• WHERE
• …YearGroup = 11 Ignore capitals.
Do not accept * or additional fields
for BP1
22
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
(e) (i) • any example of simplification/removing data or focussing 1 Must be applicable to this program (in
on data (in the design) (AO3) the context of students and a sports
day), not a generic description of
Examples : what abstraction is. Give BOD where
- “focus on student names and events”
this is unclear.
- “ignore data such as students’ favourite subjects”
- “store year groups instead of ages or DOB”
- “shows student IDs instead of full student details”
(ii) • any example of breaking down the program into 1 Must be applicable to this program,
sections/subroutines (AO3) not a generic description of what
• any example of breaking down the database into tables decomposition is. Give BOD where
this is unclear.
Examples :
- “splits the program up into different events” Do not give answers discussing
- “separates the validation routines into subroutines” splitting into fields (e.g. split into
- “breaks the database down into a table per event” StudentID, YearGroup, etc).
23
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
(f) • Input team name AND score and store / use separately 6 For BP3, allow "stop" to be entered
• Attempt at using iteration… (AO3) for either team name or score (or
• …to enter team/score until "stop" entered both). Allow third input (e.g. "do you
• Calculates highest score wish to stop?")
• Calculates winning team name…
• …Outputs highest score and team name Allow use of break (or equivalent) to
exit loop for BP3.
Example 1
highscore = 0 Allow use of recursive function(s) for
while team != "stop" BP2/3.
team = input("enter team name")
score = input("enter score") Initialisation of variables not needed -
if score > highscore then
assume variables are 0 or empty
highscore = score
string if not set.
highteam = team
Ignore that multiple teams could get
endif
the same high score, assume only
endwhile
one team has the highest score.
print(highscore)
print(highteam)
BP4/5 could be done in many ways –
see examples. Allow any logically
Example 2 (alternative) valid method. Allow use of max/sum
scores = [] functions and use of arrays/lists.
teams = []
while team != "stop" FT for BP6 if attempt made at
team = input("enter team name") calculating highest score/name
score = input("enter score")
scores.append(score) If answer simply asks for multiple
teams.append(team) entries (not using iteration), BP2 and
endwhile 3 cannot be accessed but all others
highscore = max[scores] available.
highteam = teams[scores.index(highscore)]
24
J277/02 Mark Scheme June 2024
Question Answer Mark Guidance
print(highscore) For minor syntax errors (e.g. missing
print(highteam) quotation marks or == for
assignment, spaces in variable
names) penalise once then FT.
25
Need to get in touch?
If you ever have any questions about OCR qualifications or services (including administration, logistics and teaching) please feel free to get in
touch with our customer support centre.
Call us on
01223 553998
ocr.org.uk/qualifications/resource-finder
ocr.org.uk
Twitter/ocrexams
/ocrexams
/company/ocr
/ocrexams
OCR is part of Cambridge University Press & Assessment, a department of the University of Cambridge.
For staff training purposes and as part of our quality assurance programme your call may be recorded or monitored. © OCR
2024 Oxford Cambridge and RSA Examinations is a Company Limited by Guarantee. Registered in England. Registered office
The Triangle Building, Shaftesbury Road, Cambridge, CB2 8EA.
OCR operates academic and vocational qualifications regulated by Ofqual, Qualifications Wales and CCEA as listed in their
qualifications registers including A Levels, GCSEs, Cambridge Technicals and Cambridge Nationals.
OCR provides resources to help you deliver our qualifications. These resources do not represent any particular teaching method
we expect you to use. We update our resources regularly and aim to make sure content is accurate but please check the OCR
website so that you have the most up-to-date version. OCR cannot be held responsible for any errors or omissions in these
resources.
Though we make every effort to check our resources, there may be contradictions between published support and the
specification, so it is important that you always use information in the latest specification. We indicate any specification changes
within the document itself, change the version number and provide a summary of the changes. If you do notice a discrepancy
between the specification and a resource, please contact us.
Whether you already offer OCR qualifications, are new to OCR or are thinking about switching, you can request more
information using our Expression of Interest form.
Please get in touch if you want to discuss the accessibility of resources we offer to support you in delivering our qualifications.