Computer Science Paper 2 HL Markscheme
Computer Science Paper 2 HL Markscheme
Markscheme
November 2023
Computer science
Higher level
Paper 2
35 pages
–2– 8823 – 7012M
All rights reserved. No part of this product may be reproduced in any form or by any
electronic or mechanical means, including information storage and retrieval systems,
without the prior written permission from the IB. Additionally, the license tied with this
product prohibits use of any selected files or extracts from this product. Use by third
parties, including but not limited to publishers, private teachers, tutoring or study services,
preparatory schools, vendors operating curriculum mapping services or teacher resource
digital platforms and app developers, whether fee-covered or not, is prohibited and is a
criminal offense.
More information on how to request written permission in the form of a license can be
obtained from https://ibo.org/become-an-ib-school/ib-publishing/licensing/applying-for-a-
license/.
Tous droits réservés. Aucune partie de ce produit ne peut être reproduite sous quelque
forme ni par quelque moyen que ce soit, électronique ou mécanique, y compris des
systèmes de stockage et de récupération d’informations, sans l’autorisation écrite
préalable de l’IB. De plus, la licence associée à ce produit interdit toute utilisation de tout
fichier ou extrait sélectionné dans ce produit. L’utilisation par des tiers, y compris, sans
toutefois s’y limiter, des éditeurs, des professeurs particuliers, des services de tutorat ou
d’aide aux études, des établissements de préparation à l’enseignement supérieur, des
fournisseurs de services de planification des programmes d’études, des gestionnaires de
plateformes pédagogiques en ligne, et des développeurs d’applications, moyennant
paiement ou non, est interdite et constitue une infraction pénale.
Pour plus d’informations sur la procédure à suivre pour obtenir une autorisation écrite
sous la forme d’une licence, rendez-vous à l’adresse https://ibo.org/become-an-ib-school/
ib-publishing/licensing/applying-for-a-license/.
Todos los derechos reservados. No se podrá reproducir ninguna parte de este producto
de ninguna forma ni por ningún medio electrónico o mecánico, incluidos los sistemas de
almacenamiento y recuperación de información, sin la previa autorización por escrito del
IB. Además, la licencia vinculada a este producto prohíbe el uso de todo archivo o
fragmento seleccionado de este producto. El uso por parte de terceros —lo que incluye,
a título enunciativo, editoriales, profesores particulares, servicios de apoyo académico o
ayuda para el estudio, colegios preparatorios, desarrolladores de aplicaciones y
entidades que presten servicios de planificación curricular u ofrezcan recursos para
docentes mediante plataformas digitales—, ya sea incluido en tasas o no, está prohibido
y constituye un delito.
En este enlace encontrará más información sobre cómo solicitar una autorización por
escrito en forma de licencia: https://ibo.org/become-an-ib-school/ib-publishing/licensing/
applying-for-a-license/.
–3– 8823 – 7012M
Mark allocation
Candidates are required to answer all questions in one Option. Total 65 marks.
General
A markscheme often has more specific points worthy of a mark than the total allows. This is intentional.
Do not award more than the maximum marks allowed for that part of a question.
When deciding upon alternative answers by candidates to those given in the markscheme, consider the
following points:
• Each statement worth one point has a separate line and the end is signified by means of
a semi-colon (;).
• An alternative answer or wording is indicated in the markscheme by a “/”; either wording can be
accepted.
• If the candidate’s answer has the same meaning or can be clearly interpreted as being the same as
that in the markscheme then award the mark.
• Mark positively. Give candidates credit for what they have achieved and for what they have got
correct, rather than penalizing them for what they have not achieved or what they have got wrong.
• Remember that many candidates are writing in a second language; be forgiving of minor linguistic
slips. In this subject effective communication is more important than grammatical accuracy.
• Occasionally, a part of a question may require a calculation whose answer is required for subsequent
parts. If an error is made in the first part then it should be penalized. However, if the incorrect answer
is used correctly in subsequent parts then follow through marks should be awarded. Indicate this
with “FT”.
General guidance
Issue Guidance
Answering • In the case of an “identify” question, read all answers and mark positively up to the
more than maximum marks. Disregard incorrect answers.
the quantity • In the case of a “describe” question, which asks for a certain number of facts
of eg “describe two kinds”, mark the first two correct answers. This could include two
responses descriptions, one description and one identification, or two identifications.
prescribed • In the case of an “explain” question, which asks for a specified number of
in the explanations eg “explain two reasons …”, mark the first two correct answers.
questions This could include two full explanations, one explanation, one partial explanation etc.
–4– 8823 – 7012M
Option A — Databases
Crash recovery;
If a crash occurs mid-transaction;
The system follows a protocol/algorithm to recover lost data;
A check is made of the states of the transactions that were being executed;
If the transaction can be completed it should do so;
If not the transactions that were interrupted during the crash are rolled back;
No transaction can be allowed to leave in an inconsistent state;
–7– 8823 – 7012M
Accept variations of this diagram. Owner, Pet, and Passport correctly positioned.
Positive
If the agenda has a positive impact, then it is fine to use these tools;
e.g. show all crime (even minor crime) to boost the funding for emergency services;
May make it easier for decision makers to understand the data;
Which in turn, may save lives;
Conclusion
It is ethical to use all tools at your disposal. The opposition may also use these tools;
You run the risk that a counter map will be produced showing a very different perspective to
yours;
–9– 8823 – 7012M
A B C
1 1 2 3
2 1 3 2
3 2 1 3
4 2 3 1
5 3 1 2
6 3 2 1
Award the mark if the sequence differs but the content is correct.
=IF(B1>A1,B1,C1)
=COUNTIF(D$1:D$6,E1)
Alternative solution:
=SUM(IF($D$1=1,1,0), IF($D$2=1,1,0), ... IF($D$6=1,1,0))
A B C D E F G
1 1 2 3 2 1 1 16.7%
2 1 3 2 3 2 2 33.3%
3 2 1 3 3 3 3 50%
4 2 3 1 3
5 3 1 2 2
6 3 2 1 1
Note that the spreadsheet is not necessary. Only the values in G are needed.
– 11 – 8823 – 7012M
=IF(B1>A1,B1,IF(C1>A1,C1,D1));
Advantages
Spreadsheet reduces the likelihood of calculation mistakes;
You can clearly see which cat is chosen;
You could create a graph to visualise the results;
Formulas can be changed easily e.g. if you change your decision making;
(e.g. always reject the first two cat, accept the third cat if higher than the first two, else
choose the fourth cat;)
Disadvantages
There is no easy way to calculate ordered permutations/permutations need to be entered
manually;
May lead to errors if the formula needs to be changed e.g. If statements changed to reflect
decision-making;
(e.g. always reject the first two cat, accept the third cat if higher than the first two, else
choose the fourth cat;)
Conclusion
Works well when there are only 3 or 4 cats;
For more than 4 cats it is unrealistic to model using a spreadsheet;
– 12 – 8823 – 7012M
Example 1:
function FACTORIAL(N):
TOTAL = 1
loop X from 1 to N
TOTAL = TOTAL * X
end loop
return TOTAL
end function
Example 2:
function FACTORIAL(N):
if N == 0 or N == 1 then // does not need to include N==0
return(1)
else
return FACTORIAL(N-1) * N
end if
end function
Example 1:
function FINDHIGH(ARR):
HIGHEST = -1
loop COUNT from 0 to 2
if ARR[COUNT] > HIGHEST then
HIGHEST = ARR[COUNT]
end if
end loop
return HIGHEST
end function
– 13 – 8823 – 7012M
Example 2:
function FINDHIGH(ARR):
HIGHEST = ARR[0]
if ARR[1] > HIGHEST then
HIGHEST = ARR[1]
end if
if ARR[2] > HIGHEST then
HIGHEST = ARR[2]
end if
return HIGHEST
end function
Example 1:
START = 3
ARRLEN = 8
TOTAL = 0
loop ROW from 0 to (FACTORIAL(ARRLEN)-1)
HIGHEST = FINDHIGH(ARR)
FOUND = False
POS = START
loop while FOUND = False and POS < ARRLEN
if ARR[POS] > HIGHEST then
CHOICE = ARR[POS]
FOUND = True
end if
POS = POS + 1
end loop
if FOUND = False then
CHOICE = ARR[ARRLEN-1]
end if
if CHOICE = X then
TOTAL = TOTAL + 1
end if
if ROW < FACTORIAL(ARRLEN)-1 then
ARR = NEXTPERMUTATION(ARR) // accept without test
end if
end loop
PERCENT = TOTAL/FACTORIAL(ARRLEN)*100
output(PERCENT)
– 14 – 8823 – 7012M
Example 2 (simplified):
TOTAL = 0
loop ROW from 0 to (FACTORIAL(8)-1)
HIGHEST = FINDHIGH(ARR)
FOUND = False
POS = 3
loop while FOUND = False and POS < 8
if ARR[POS] > HIGHEST then
CHOICE = ARR[POS]
FOUND = True
end if
POS = POS + 1
end loop
if FOUND = False then
CHOICE = ARR[7]
end if
if CHOICE = X then
TOTAL = TOTAL + 1
end if
ARR = NEXTPERMUTATION(ARR)
end loop
PERCENT = TOTAL/FACTORIAL(ARRLEN)*100
output(PERCENT)
Do not award marks for ‘using a GPU’ since this won’t be useful on its own.
– 15 – 8823 – 7012M
Accept answers that only address components of the visualization, not the process of.
The AI is likely to use English as an intermediate for translation from Bengali to Polish;
Because there are more datasets of Bengali to English and English to Polish than Bengali to
Polish;
This increases the likelihood of translation errors;
Bengali and Polish use different alphabets, whereas English and French use very similar
alphabets;
This increases the likelihood of correct translations/has an impact on the ease of the
translation;
– 18 – 8823 – 7012M
User-Centric Assumptions:
Search algorithms may have inherent biases;
Based on developer assumptions
That affect result relevance and diversity;
Accessibility;
Cloud storage allows an organisation to access the stored files from anywhere increasing the
accessibility and usability;
Users can easily drop files to save in the cloud storage;
Files can be shared with team members and clients with multiple different devices in an easy
way;
Scalability;
The organization can pay for as much they use;
They can easily scale up/down the storage when they need to do so;
Depending on changing demands for storage;
Challenges to Decentralization:
Centralized data in the cloud presents significant security risks, which can impede
decentralization efforts due to the attractive target it presents for cyber threats;
A lack of adopted standards for interoperability across different platforms hinders the
possibility of a decentralized web ecosystem;
The economic advantages that large-scale providers have due to their size can dissuade the
shift towards a more decentralized infrastructure;
Impact on Innovation:
The control exercised by a few large cloud providers can create high barriers to entry,
potentially stifling innovation in the sector;
Data Sovereignty:
Data storage by centralized cloud services in various international locations raises issues of
data sovereignty;
Affected by differing local laws and practices;
Network Effects:
The strong network effects associated with the services of large providers enhance their
value as more users join;
Reinforcing the centralization of the web;
Conclusion:
Decentralization may remain limited until peer-to-peer and blockchain technologies become
more mainstream and offer a viable alternative to centralized cloud storage;
Environmental concerns over the distributed computing model may challenge its adoption,
with its benefits needing to outweigh its carbon footprint;
Government regulations could significantly impact the trajectory towards decentralization,
either by imposing barriers or by encouraging diversified storage practices;
A cultural shift towards prioritizing data privacy and control may catalyze movements towards
a more decentralized web structure.
– 24 – 8823 – 7012M
Processing:
The ambient intelligence system analyzes real-time data against established norms to detect
anomalies or changes in the patient’s condition;
Behavior monitoring algorithms identify patterns and deviations, signaling potential
emergencies or the need for adjustments in care;
Data from multiple smart homes is aggregated to improve early detection and treatment
approaches for patients with similar conditions;
Output:
Automated adjustments to the home environment, such as turning on heating or cooling, are
triggered to maintain optimal conditions;
Notifications and reminders for medication and appointments are provided to the patient;
Alerts are sent to caregivers or emergency services when urgent intervention is required
based on the patient’s activities or health readings;
Example:
Example:
Note: Candidates are not expected to cater for a situation in which the Arena is full
AND the monster is already there. They may give either or both error messages if
this is the case.
Example:
Not good for modelling situations in which only single objects/instances are needed;
A small application may not require all those features;
A method with the same name and parameters is created / inherited in the subclass;
and used instead of the method in the superclass;
Example 1:
Example 2:
Example 3:
Example 4:
(Inheritance)
Award [1] mark - Each Specific card extends its monster type class (eg. Splashy
extends WaterMonster)
Award [1] mark - Therefore specific cards will inherit the public behaviour (abilities)
from the Monster class and their MonsterType class
Award [1] mark - Ability1 must be implemented in Monster class and will be inherited
by all
Award [1] mark - Abillity2 and Ability3 should be defined in the Monster class (but not
implemented
(Polymorphism)
Award [1] mark - Ability2 should be overridden in Monster type class (eg. WaterType)
Award [1] mark - Ability3 should be overridden in class of specific monster (eg.
Squishy)
(both)
Award [1] mark – A specific behaviour is defined/overridden in the subclasses
Award [1] mark – The default behaviour is defined in the superclass
– 33 – 8823 – 7012M
Example:
Example:
if (effectiveness>mostEffective)
{
if (monsters[i].health>healthiest)
{
chosen=monsters[i];
healthiest=monsters[i].health;
mostEffective=effectiveness;
}
}
}
return chosen;
}
Speed/order of access:
A stack is accessed in LIFO order whereas a Linked List is traversed starting from
the first node;
Therefore, a stack would allow faster access to the most recent turns to ‘rewind’;
Method of access:
To access an element, it must be removed (popped) from stack, whereas a Linked
List can be read without removal;
Therefore, if a stack is used the removed items would have to be added again in the
correct order to gameLog;
Note to examiners: accept explanations that use code to support the explanation.
Example answer: