Cambridge IGCSE: Computer Science For Examination From 2023

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Cambridge IGCSE™

COMPUTER SCIENCE 0478/02


Paper 2 Algorithms, Programming and Logic For examination from 2023
MARK SCHEME B
Maximum Mark: 75

Specimen

This document has 14 pages.

© Cambridge University Press & Assessment 2023 [Turn over


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Generic Marking Principles

These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alongside the specific
content of the mark scheme or generic level descriptors for a question. Each question paper and mark scheme will also comply with these marking
principles.

GENERIC MARKING PRINCIPLE 1:

Marks must be awarded in line with:

• the specific content of the mark scheme or the generic level descriptors for the question
• the specific skills defined in the mark scheme or in the generic level descriptors for the question
• the standard of response required by a candidate as exemplified by the standardisation scripts.
GENERIC MARKING PRINCIPLE 2:

Marks awarded are always whole marks (not half marks, or other fractions).
GENERIC MARKING PRINCIPLE 3:

Marks must be awarded positively:

• marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond the
scope of the syllabus and mark scheme, referring to your Team Leader as appropriate
• marks are awarded when candidates clearly demonstrate what they know and can do
• marks are not deducted for errors
• marks are not deducted for omissions
• answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assessed by the
question as indicated by the mark scheme. The meaning, however, should be unambiguous.
GENERIC MARKING PRINCIPLE 4:

Rules must be applied consistently e.g. in situations where candidates have not followed instructions or in the application of generic level
descriptors.
GENERIC MARKING PRINCIPLE 5:

Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may
be limited according to the quality of the candidate responses seen).

© Cambridge University Press & Assessment 2023 Page 2 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

GENERIC MARKING PRINCIPLE 6:

Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or grade
descriptors in mind.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2023 Page 3 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


1 B 1

Question Answer Marks


2 Programming concept Description 3

A subroutine that may not


Library routine
return a value.

A standard subroutine that is


Structure diagram
available for immediate use.

A subroutine that can be used


Procedure
in an assignment statement.

An overview of a program
Function
or subroutine.

One mark for each correct line (max 3).


0 correct 0 marks
1 correct 1 mark
2 correct 2 marks
3 or 4 correct 3 marks
Each box must have only one connection.

Question Answer Marks


3 1 mark for value and 1 mark for appropriate reason, e.g.: 4
Value 1 2
boundary should be accepted as weight OK
Value 2 two
erroneous/abnormal should be rejected

© Cambridge University Press & Assessment 2023 Page 4 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


4(a) One mark for each item correctly circled 2
• open
• write
4(b) One mark for each correct point max two: 2
• before trying to open the file
• check the file exists
• if the file does not exist, then output a suitable error message.

© Cambridge University Press & Assessment 2023 Page 5 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


5(a) One mark per correct pair of actions, processes, Input/Output, tests (apart from START and STOP) max 3. 6
One mark for complete flowlines.
One mark for working flowlines.
One mark for correct use of flowchart symbols.

START

Count  0

INPUT
Number

IS Number Yes
= 0?

No

Yes IS Number OUTPUT Count,


< 0? "positive numbers"
No

Count  Count + 1 STOP

5(b) Any two from: 2


• Use another counter/variable and initialise to zero before looping
• Increment this counter/variable when the number is less than zero/count all numbers and subtract the positive numbers
• Output this counter/variable at the end // Output both counters at the end

© Cambridge University Press & Assessment 2023 Page 6 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


6 One mark for each error identified plus suggested correction (the corrected lines must be written in full). 4

Correct lines:

Line 4 WHILE Number <= 99 OR Number >= 1001


Line 7 Num[Index] ← Number
Line 9 NEXT Index
Line 10 PRINT Count

Question Answer Marks


7(a) One mark for each correct NOT gate and OR gate with correct direction of input(s), 6
three marks for four correct AND gates
or
two marks for three correct AND gates
or
one mark for two correct AND gates with correct direction of inputs:

© Cambridge University Press & Assessment 2023 Page 7 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


7(b) X = ((A AND NOT B AND NOT C) OR (A AND B AND C)) 3
One mark for each correct part of the logic expression:

(A AND NOT B AND NOT C)


OR
(A AND B AND C)

Question Answer Marks


8 5
Weight Reject TotalWeight OUTPUT
0 0
13 13
17 30
26 1
25 55
5 60
10 70
15 85
35 2
20 105
85 Weight of items 85 Number of items rejected 2
1 mark 1 mark 1 mark to 1st 85 1 mark
1 mark 105, 85 Output must be exact

Question Answer Marks


9 B 1

© Cambridge University Press & Assessment 2023 Page 8 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


10(a) P Computer Science 5
Q 16
R Science
S 7
T Sci
10(b) One mark correct function assigned to F one mark correct parameters 2
F ← SUBSTRING(P,1,8)

Question Answer Marks


11(a) Fields 5 2
Records 8
11(b) Any two from: 2
• length check
• type check
• presence check
• format check
11(c) One mark content and one mark field order: 2

03 Nov Acoustic Evening

© Cambridge University Press & Assessment 2023 Page 9 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


12(a) The whole algorithm must be rewritten for full marks. 4

One mark for each of the following:


• initialising counter outside the loop
• updating counter inside loop
• suitable exit value at start of loop
• correct use of WHILE … DO … ENDWHILE

Example:
B ← FALSE
INPUT Num
Counter ← 1
WHILE Counter <= 12 DO
IF A[Counter] = Num
THEN
B ← TRUE
ENDIF
Counter ← Counter + 1
ENDWHILE
12(b) Linear search 1
12(c) Any three from: 3
• WHILE has criteria check at start // pre-condition
• code inside WHILE may never run
• REPEAT UNTIL has criteria check at end // post-condition
• REPEAT UNTIL will always run at least once

© Cambridge University Press & Assessment 2023 Page 10 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


13 Read the whole answer: 15
Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the
programming language used (Python, VB.NET or Java)
On script tick if requirement met, cross if no attempt seen, omission mark and/or comment if partially met (see marked
scripts).
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach
Then add up the total.
Marks are available for:
AO2 (maximum 9 marks)
AO3 (maximum 6 marks)

Techniques required:
R1 Procedure that takes the hospital number as a parameter (use of procedures and parameters)
R2 Check if hospital number valid (selection, use of 1D array)
R3 Check temperature reading (selection, use of 2D array)
R4 Check pulse reading (selection, use of 2D array)
R5 Output appropriate messages for each selection (output with appropriate messages)

Data Structures required:


The names underlined must be used as given in the scenario
Arrays or lists Patient, Readings
Variables HospitalNumber
Constants TempHigh, TempLow, PulseHigh, PulseLow could be variables

Example 15 mark answer in pseudocode.

//Declaration of variables and constants


CONSTANT TempHigh = 37.2
CONSTANT TempLow = 31.6
CONSTANT PulseHigh = 100.0
CONSTANT PulseLow = 55.0

© Cambridge University Press & Assessment 2023 Page 11 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

Question Answer Marks


13 PROCEDURE CheckPatient(HospitalNumber :INTEGER)
IF HospitalNumber >=1 AND HospitalNumber <=1000 // check for valid hospital number
THEN
OUTPUT "Name of Patient ",Patient(HospitalNumber)
IF Reading[HospitalNumber,1] <= TempHigh AND
Reading[HospitalNumber,1] >= TempLow AND
Reading[HospitalNumber,2] <= PulseHigh AND
Reading[HospitalNumber,2] >= PulseLow // check if all readings normal
THEN
OUTPUT "Normal readings"
ENDIF
IF (Reading[HospitalNumber,1] <= TempHigh AND
Reading[HospitalNumber,1] >= TempLow) AND
(Reading[HospitalNumber,2] > PulseHigh OR
Reading[HospitalNumber,2] < PulseLow) // check if pulse out of range
THEN
OUTPUT "Warning Pulse"
ENDIF
IF (Reading[HospitalNumber,1] > TempHigh OR
Reading[HospitalNumber,1] < TempLow) AND
(Reading[HospitalNumber,2] <= PulseHigh AND
Reading[HospitalNumber,2] >= PulseLow) // check if temp out of range
THEN
OUTPUT "Warning temperature"
ENDIF
IF (Reading[HospitalNumber,1] > TempHigh OR
Reading[HospitalNumber,1] < TempLow) AND
(Reading[HospitalNumber,2] > PulseHigh OR
Reading[HospitalNumber,2] < PulseLow) // check if both out of range
THEN
OUTPUT "Severe warning, Pulse and temperature"
ENDIF
ELSE
OUTPUT "Hospital number not valid"
ENDIF
ENDPROCEDURE
© Cambridge University Press & Assessment 2023 Page 12 of 14
0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

AO2: Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the analysis
and design of computational or programming problems
0 1–3 4–6 7–9
At least one programming technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario
counting, totalling, input and output. to the scenario, refer to the list of have been covered by the use of
techniques needed. appropriate programming techniques,
refer to the list of techniques needed.
No creditable response
Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
data required. required.
Any use of variables or arrays or other
language-dependent data structures, More than one data structure used The data structures used store all the
e.g. Python lists. to store data that is required by the data that is required by the scenario.
scenario.

© Cambridge University Press & Assessment 2023 Page 13 of 14


0478/02 Cambridge IGCSE – Mark Scheme For examination
SPECIMEN from 2023

AO3: Provide solutions to problems by:


• evaluating computer systems
• making reasoned judgements
• presenting conclusions
0 1–2 3–4 5–6
Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented.
Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have been
used throughout.
Some of the data structures used have Most of the data structures used have
meaningful names. meaningful names. All the data structures used have
meaningful names.
The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.
The solution is inaccurate in many The solution contains parts that are The solution is accurate.
No creditable response
places. inaccurate.
Solution logically performs all the tasks
Solution contains few lines of code, Solution contains lines of code, with given in the scenario. Ignore minor
with errors, that attempt to perform a some errors, that logically perform syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.
The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. requirements. requirements given in the question.

Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given in
attempt at least one task given in the perform most tasks given in the the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2023 Page 14 of 14

You might also like