GCE
Computer Science
H046/02: Algorithms and problem solving
Advanced Subsidiary GCE
Mark Scheme for November 2020
Oxford Cambridge and RSA Examinations
OCR (Oxford Cambridge and RSA) is a leading UK awarding body, providing a wide range of
qualifications to meet the needs of candidates of all ages and abilities. OCR qualifications
include AS/A Levels, Diplomas, GCSEs, Cambridge Nationals, Cambridge Technicals,
Functional Skills, Key Skills, Entry Level qualifications, NVQs and vocational qualifications in
areas such as IT, business, languages, teaching/training, administration and secretarial skills.
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 2020
Oxford Cambridge and RSA Examinations
H046/02 Mark Scheme November 2020
Annotations
Annotation Meaning
Omission mark
Benefit of the doubt
Incorrect point
Follow through
Not answered question
No benefit of doubt given
Repeat
Correct point
Too vague
Zero (big)
Blank Page – this annotation must be used on all blank pages within an answer booklet (structured or
unstructured) and on each page of an additional object where there is no candidate response.
Level 1
Level 2
Level 3
H046/02 Mark Scheme November 2020
Subject Specific Marking Instructions
INTRODUCTION
Your first task as an Examiner is to become thoroughly familiar with the material on which the examination depends. This material includes:
• the specification, especially the assessment objectives
• the question paper and its rubrics
• the mark scheme.
You should ensure that you have copies of these materials.
You should ensure also that you are familiar with the administrative procedures related to the marking process. These are set out in the OCR booklet
Instructions for Examiners. If you are examining for the first time, please read carefully Appendix 5 Introduction to Script Marking: Notes for New
Examiners.
Please ask for help or guidance whenever you need it. Your first point of contact is your Team Leader.
USING THE MARK SCHEME
Please study this Mark Scheme carefully. The Mark Scheme is an integral part of the process that begins with the setting of the question paper and ends
with the awarding of grades. Question papers and Mark Schemes are developed in association with each other so that issues of differentiation and positive
achievement can be addressed from the very start.
This Mark Scheme is a working document; it is not exhaustive; it does not provide ‘correct’ answers. The Mark Scheme can only provide ‘best guesses’
about how the question will work out, and it is subject to revision after we have looked at a wide range of scripts.
The Examiners’ Standardisation Meeting will ensure that the Mark Scheme covers the range of candidates’ responses to the questions, and that all
Examiners understand and apply the Mark Scheme in the same way. The Mark Scheme will be discussed and amended at the meeting, and administrative
procedures will be confirmed. Co-ordination scripts will be issued at the meeting to exemplify aspects of candidates’ responses and achievements; the co-
ordination scripts then become part of this Mark Scheme.
Before the Standardisation Meeting, you should read and mark in pencil a number of scripts, in order to gain an impression of the range of responses and
achievement that may be expected.
In your marking, you will encounter valid responses which are not covered by the Mark Scheme: these responses must be credited. You will encounter
answers which fall outside the ‘target range’ of Bands for the paper which you are marking. Please mark these answers according to the marking criteria.
Please read carefully all the scripts in your allocation and make every effort to look positively for achievement throughout the ability range. Always be
prepared to use the full range of marks.
H046/02 Mark Scheme November 2020
LEVELS OF RESPONSE QUESTIONS:
The indicative content indicates the expected parameters for candidates’ answers, but be prepared to recognise and credit unexpected approaches where
they show relevance.
Using ‘best-fit’, decide first which set of BAND DESCRIPTORS best describes the overall quality of the answer. Once the band is located, adjust the mark
concentrating on features of the answer which make it stronger or weaker following the guidelines for refinement.
• Highest mark: If clear evidence of all the qualities in the band descriptors is shown, the HIGHEST Mark should be awarded.
• Lowest mark: If the answer shows the candidate to be borderline (i.e. they have achieved all the qualities of the bands below and show limited
evidence of meeting the criteria of the band in question) the LOWEST mark should be awarded.
• Middle mark: This mark should be used for candidates who are secure in the band. They are not ‘borderline’ but they have only achieved some of
the qualities in the band descriptors.
Be prepared to use the full range of marks. Do not reserve (e.g.) high Band 3 marks ‘in case’ something turns up of a quality you have not yet seen. If an
answer gives clear evidence of the qualities described in the band descriptors, reward appropriately.
H046/02 Mark Scheme November 2020
AO1 AO2 AO3
High (thorough) Precision in the use of question Knowledge and understanding Concerted effort is made to
terminology. Knowledge shown shown is consistently applied to consider all aspects of a system
is consistent and well- context enabling a logical and / problem or weigh up both
developed. Clear appreciation sustained argument to develop. sides to an argument before
of the question from a range of Examples used enhance rather forming an overall conclusion.
different perspectives making than detract from response. Judgements made are based
extensive use of acquired on appropriate and concise
knowledge and understanding. arguments that have been
developed in response resulting
in them being both supported
and realistic.
Middle (reasonable) Awareness of the meaning of Knowledge and understanding There is a reasonable attempt
the terms in the question. applied to context. Whilst clear to reach a conclusion
Knowledge is sound and evidence that an argument considering aspects of a system
effectively demonstrated. builds and develops through / problem or weighing up both
Demands of question response there are times when sides of an argument. However
understood although at times opportunities are missed to use the impact of the conclusion is
opportunities to make use of an example or relate an aspect often lessened by a lack of
acquired knowledge and of knowledge or understanding supported judgements which
understanding not always to the context provided. accompany it. This inability to
taken. build on and develop lines of
argument as developed in the
response can detract from the
overall quality of the response.
Low (basic) Confusion and inability to Inability to apply knowledge and Little or no attempt to prioritise
deconstruct terminology as understanding in any sustained or weigh up factors during
used in the question. way to context resulting in course of answer. Conclusion is
Knowledge partial and tenuous and unsupported often dislocated from response
superficial. Focus on question statements being made. and any judgements lack
narrow and often one- Examples if used are for the substance due in part to the
dimensional. most part irrelevant and basic level of argument that has
unsubstantiated. been demonstrated throughout
response.
H046/02 Mark Scheme November 2020
Question Answer Mark Guidance
1 (a) (i) 1 mark per bullet up to a maximum of 3 marks, e.g: 3 Allow other suitable responses that are applied to the
• Classroom displays have been removed scenario in the question.
• People have been removed / simplified with A02.1
symbols (3)
• Wall/carpet colours/details have been removed
• Diagram is not to scale.
1 (a) (ii) 1 mark per bullet up to a maximum of 2 marks for each 4
benefit (4 marks maximum in total), e.g:
• Reduced development time (1) as factors that A01.2
can detract from the program can be ignored (1) (2)
• Program more likely to solve the problem (1) as
unnecessary aspects will not detract from the A02.1
main purpose of the program (1) (2)
• Reduces complexity of programming code (1)
therefore can run on lower spec computers(1)
1 (b) (i) • Selection/branching 1
A03.3
(1)
1 (b) (ii) 1 mark per bullet up to a maximum of 3 marks, e.g: 4
• The number of user attempts is not known
• The code will need to continue until the A02.1
password entered is correct (4)
• A while loop will keep repeating until the correct
password has been input // condition is met
• A for loop will only repeat a certain number of
times
• A for loop may continually ask for password
even though it’s been entered correctly
1 (b) (iii) 1 mark per bullet up to a maximum of 3 marks, e.g: 3 Example Solution
• Correct use of do at the start of the loop.
A03.2 do
• Correct use of until at the end of the loop. enteredPassword=input("Enter Password")
• Correct logic for inputting password, checking (3) if enteredPassword == correctPassword then
the entered password and for setting check to check = true
true/checking the password within the endif
until check == true
condition of the loop.
Alternative solution
H046/02 Mark Scheme November 2020
do
enteredPassword=input("Enter Password")
until enteredPassword==correctPassword
1 (c) (i) 1 mark for identifying a feature and 1 mark for stating 6 Allow other suitable responses that are appropriate to
how it can be used up to a maximum of 2 marks for writing programming code such as automatic syntax
each IDE feature (6 marks maximum in total.) A01.1 analysis, automatic cross-referencing, line numbers and
(3) code comments, automated refactoring, automated
For example: code generation (e.g. creating templates for common
• Autocomplete (1) which will predict variable / A01.2 patterns).
built-in functions (1) (3)
• Auto indent (1) to automatically indent code
when selection / iterative statements are used
(1)
• Colour coding (1) to be able to distinguish
between the different parts of each
statement/line (1)
1 (c) (ii) 1 mark per bullet up to a maximum of 2 marks for each 4 Allow other suitable responses.
benefit(4 marks maximum in total), e.g:
• Reduced development time (1) due to time A01.1
boxing / each subtask being given a strict time (2)
limit (1)
• Increased user involvement (1) so issues can be A01.2
identified and fixed early / more likely to meet (2)
client requirements (1)
• The requirements do not all need to be stated at
the start (1) so therefore it is more flexible (1)
1 (c) (iii) 1 mark per bullet up to a maximum of 2 marks, e.g: 2 Response must cover both black box and white box
• Black box is when the internal structure/ design testing for 2 marks.
is not known (to the tester) A01.2
• Black box requires limited/no programming (2)
knowledge
• White box is when the internal structure/ design
is known (to the tester)
• White box requires programming knowledge
H046/02 Mark Scheme November 2020
Mark Band 3 – High level (7-9 marks) 9 Knowledge and Understanding
The candidate demonstrates a thorough knowledge and understanding of • All adjacent items are compared against each other.
bubble sorts; the material is generally accurate and detailed. The candidate is • The biggest number in the adjacent pair is swapped over
able to apply their knowledge and understanding directly and consistently to AO1.1
with the smallest number. A temp variable is used to hold
the context provided. Evidence/examples will be explicitly relevant to the (2) the data while it’s being moved.
explanation. The candidate is able to weigh up the use of bubble sorts within • When a swap is made a flag is set.
the context which results in a supported and realistic judgment as to whether AO1.2 • This is repeated for all adjacent values, known as one
it is suitable to use within the context.There is a well-developed line of
reasoning which is clear and logically structured. The information presented is
(2) pass.
• At the end of one pass, the largest item should appear at
relevant and substantiated.
the end of the list.
A02.1
Mark Band 2 – Mid level (4-6 marks) • If at the end of the list the flag has been set the flag is
(2) unset and the algorithm starts from the beginning of the
The candidate demonstrates reasonable knowledge and understanding of
bubble sorts; the material is generally accurate but at times list again.
underdeveloped.The candidate is able to apply their knowledge and A03.3 • When the algorithm gets to the end of the list and the flag
understanding directly to the context provided although one or two (3) is unset the list is sorted.
opportunities are missed. Evidence/examples are for the most part implicitly
relevant to the explanation. Application
The candidate makes a reasonable attempt to come to a conclusion showing As there are 250,000 items a bubble sort would perform
2 (a) some recognition of influencing factors that would determine whether it is
•
very slowly as a lot of passes will need to be made in
possible to use bubble sorts in this context. order to sort the items.
There is a line of reasoning presented with some structure. The information • Bubble sorts are better suited to data sets where the
presented is in the most part relevant and supported by some evidence items are almost/partly sorted. However the smaller
numbers are currently towards the end and the larger
Mark Band 1 – Low Level (1-3 marks) numbers are towards the start.
The candidate demonstrates a basic knowledge of bubble sorts with limited • This will therefore increase the amount of comparisons /
understanding shown; the material is basic and contains some inaccuracies. passes/swaps required which will therefore slow the
The candidates makes a limited attempt to apply acquired knowledge and performance of the sort down.
understanding to the context provided. The candidate provides nothing more
than an unsupported assertion.The information is basic and comunicated in
an unstructured way. The information is supported by limited evidence and Evaluation
the relationship to the evidence may not be clear. • The algorithm is easy to implement as the number of lines
of code is less than other standard sorting algorithms.
0 marks • Although a bubble sort will be able to sort the items into
No attempt to answer the question or response is not worthy of credit. order, it will take longer than other sorting algorithms due
to the number of items and the current order or items in
the unsorted list.
H046/02 Mark Scheme November 2020
2 (b) (ii) • 249,999 1
A02.2
(1)
2 (c) (iii) 1 mark per bullet up to a maximum of 4 marks: 4 Allow other valid interpretations
• The inner loop will compare all of the adjacent e.g. conditional while loop … used to compare against
items…. A01.2 swap flag after each pass; counter controlled for loop …
• ….in a single pass (4) used to check adjacent items on each pass
• The outer loop will repeat the process of
checking adjacent items….
• …until all passes are complete / the items are
sorted/no swaps have been made in a pass
2 (d) (iv) • Insertion sort 1 Allow other sorting algorithms not listed in the
A02.1 specification (e.g. Merge Sort, Quick Sort etc)
(1)
3 (a) (i) 1 mark per bullet up to a maximum of 4 marks: 4
• A queue is First In First Out (FIFO)
• Therefore bookings will be executed in the order A02.2
they have received (4)
• A stack is Last In First Out (LIFO)
• Therefore the bookings would be executed from
the most recent booking
3 (a) (ii) custNumber 1
A03.3
(1)
3 (a) (iii) 1 mark per bullet up to a maximum of 2 marks: 2
• Correct logic for incrementing the tail pointer by
1 (e.g. tail = tail +1) A03.2
• Correct logic for adding custNumber to the tail (2)
pointer (e.g. queue[tail]=custNumber)
3 (a) (iv) • If the tail is greater than 10 / maxElements 1 Accept:
A02.2 not((tail + 1) > maxElements)
(1) Or
(tail + 1) <= maxElements
Or equivalent
H046/02 Mark Scheme November 2020
3 (b) (i) 1 mark per bullet up to a maximum of 3 marks: 3
• 5 (Jimmy)
• 8 (Siad) A02.1
• 9 (Tommy) (3)
3 (b) (ii) 1 mark per bullet up to a maximum of 2 marks, e.g: 2
• Efficient A01.2
• ...as does not need to search every single (2)
element/uses divide and conquer
3 (b) (iii) • Linear Search / Serial Search 1
A02.1
(1)
3 (b) (iv) • The items are in alphabetical order / the items 1
are sorted A02.1
(1)
4 1 mark per bullet up to a maximum of 9 marks: 9 Example solution:
• Defining the createUsername procedure
A03.1 procedure createUsername()
correctly firstname = input("Enter First Name")
• Suitable logic for inputting the first name (3) surname = input("Enter Surname")
number = 0
• Suitable logic for inputting the surname while unique == false
• Suitable logic for using the first letter of the first A03.2 number = number + 1
name (6) username = surname + firstname.substring(0,1) +
str(number)
• Suitable logic for joining the different sections of unique = existingUsers(username)
the username together endwhile
print("Username is unique")
• Suitable logic to pass the username into the endprocedure
function existingUsers (eg as a parameter
or global variable) There are many different ways that this procedure could
• Suitable logic for continually increasing the have been achieved. Therefore other alternative
number by 1 ….. methods should be given credit (candidates may use
• …until the username is unique substring or mid to access first character of
• Sensible use of variable names and indentation firstname).
throughout
5 (a) • 30 1
A03.2
H046/02 Mark Scheme November 2020
(1)
5 (b) • 10 1
A03.2
(1)
5 (c) • 10 1
A03.2
(1)
5 (d) • To round the number to the nearest 10 1
A02.1
(1)
OCR (Oxford Cambridge and RSA Examinations)
The Triangle Building
Shaftesbury Road
Cambridge
CB2 8EA
OCR Customer Contact Centre
Education and Learning
Telephone: 01223 553998
Facsimile: 01223 552627
Email:
[email protected]www.ocr.org.uk
For staff training purposes and as part of our quality assurance programme your call may be
recorded or monitored