Computer Science (0478) · May/June 2019 · Mark scheme 23
Cambridge Computer Science (0478) mark scheme for paper 23, May/June 2019 — 0478/23/M/J/19, file 0478_s19_ms_23.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge Assessment International Education
Cambridge International General Certificate of Secondary Education
COMPUTER SCIENCE
0478/23
Paper 2
May/June 2019
MARK SCHEME
Maximum Mark: 50
Published
This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the
examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the
details of the discussions that took place at an Examiners’ meeting before marking began, which would have
considered the acceptability of alternative answers.
Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for
Teachers.
Cambridge International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes for the May/June 2019 series for most
Cambridge IGCSE™, Cambridge International A and AS Level and Cambridge Pre-U components, and
some Cambridge O Level components.
This syllabus is regulated for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
This document consists of 8 printed pages.
© UCLES 2019
[Turn over
0478/23
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
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).
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.
© UCLES 2019
Page 2 of 8
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
0478/23
Question
Answer
Marks
Section A
1(a)
4 marks for:
Data Structure(s) max 2
• Arrays
• Variable(s) for // data entry such as Item Code // index / constant
for minimum number of items
Further description max 3
• Data type(s) one or more
• Use(s) one or more
• Name(s) one or more e.g. Item_Code, Description, Price,
Stock
• Sample data for appropriate arrays e.g. 1234, Notepad, 0.050,
1000 // Sample data for variable or constant e.g. 10
5
1 mark for:
• All four names and suitable data samples
1(b)
or
1(c)
© UCLES 2019
•
•
Keep a counter/number
Add one every time a new item code is added
•
•
Keep a list of item codes used
Using a loop check item codes is not already in the list before a
new item code is added
•
•
•
Check items in stock array
with a value of 10 or less
Display these values in a different way e.g. in red
Page 3 of 8
2
3
0478/23
Question
1(d)
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
Answer
Five from:
MP1 Enter the item code
MP2
and check if valid
MP3 Enter number to purchase and check if less than or equal to number
in stock for that item number
MP4 Display error message(s) if needed
MP5 Calculate price to pay
MP6 Using the number to purchase calculate discount
MP7 Check for new customer AND $50 spend/returning customer
eligibility
MP8
application of discount(s) if available
MP9 Check order confirmed
MP10
update appropriate stock level
Sample answer
REPEAT
PRINT "Enter Item Code"
INPUT ItemCode
Found ← False
Count ← 1
REPEAT
IF ItemCode = ItemList(Count} THEN Found ← True
ENDIF
Count ← Count + 1
UNTIL Found OR Count = NoItems
UNTIL Found
REPEAT
PRINT "Enter Number to purchase"
INPUT Number
UNTIL Number > 0 and Number <= Stock(ItemCode)
PriceToPay ← Number * Price (ItemCode)
IF Number >= 10 AND Number < 20 THEN PriceToPay ←
PriceToPay * 0.95 ENDIF
IF Number >= 20 AND Number < 50 THEN PriceToPay ←
PriceToPay * 0.9 ENDIF
IF Number >= 50 AND Number < 100 THEN PriceToPay ←
PriceToPay * 0.75 ENDIF
IF Number >= 100 AND Number < 500 THEN PriceToPay ←
PriceToPay * 0.65 ENDIF
IF Number >= 500 THEN PriceToPay ← PriceToPay * 0.5
ENDIF
PRINT "Enter Value of discount voucher, 0 if no voucher"
INPUT Voucher
PriceToPay ← PriceToPay – Voucher
PRINT "Price to pay is ", PriceToPay
PRINT "Order confirmed? Y/N"
INPUT Confirm
IF Confirm = "Y" THEN Stock(ItemCode) ← Stock(ItemCode)
– Number ENDIF
© UCLES 2019
Page 4 of 8
Marks
5
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
0478/23
Question
1(e)
Answer
Explanation
5
Five from:
MP1
Search item arrays
MP2
For stock level = 0
MP3
list these as sold out
MP4
Check stock level at end of day with original stock level//search
items sold arrays
MP5
if the same, display/store item code as not sold//if 0,
display/store item code as not sold
MP6
update largest value if greater than existing greatest value
//use max function on items sold array
//other method to find
highest number sold
MP7
display this item number with a suitable message
All programming statements used must be explained.
© UCLES 2019
Marks
Page 5 of 8
0478/23
Question
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
Answer
Marks
Section B
2(a)
1 mark for each error identified + suggested correction
4
Count ← 1 should be Count ← 0 or Count >= 500 should be
Count > 500
AND should be OR
Reject ← Reject – 1 should be Reject ← Reject + 1
Reject ← Reject/100 should be Reject ← Reject/5 or Reject
* 100 / 500
2(b)
MP1 Add Accept ← 0 at start
MP2 Add ELSE Accept ← Accept + 1 after THEN AND Over and
Under defined/position described
OR
Add Accept ← Accept + 1 after THEN AND Replace IF
statement with …<= Over AND …>= UNDER /position described
MP3 Add Accept ← Accept/5 after UNTIL AND correct loop/position
described
MP4 ADD IF Accept < 50 THEN PRINT "Less than 50%
accepted" at end
Accept ← 0
Count ← 1 // 0
Reject ← 0
Over ← 62
Under ← 58
REPEAT
INPUT ItemWeight
IF ItemWeight > Over OR ItemWeight < Under // IF
ItemWeight <= Over AND
ItemWeight >= Under
THEN
Reject ← Reject + 1
ELSE
Accept ← Accept + 1//ELSE not required
ENDIF
Count ← Count + 1
UNTIL Count > 500 // >= 500
Accept ← Accept / 5
IF Accept < 50
THEN
PRINT "Less than 50% accepted"
ENDIF
© UCLES 2019
Page 6 of 8
4
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
0478/23
Question
3
Answer
TreadReject
Count
0
1
1
Depth
2
1.7
3
1.9
4
1.4
5
1.8
6
2.0
Marks
OUTPUT
Car is potentially roadworthy
TreadReject
Count
0
1
1
2
1.2
3
1.9
4
1.4
5
1.8
6
2.4
2
Depth
OUTPUT
Car is not roadworthy
1 mark for each correct pairs of columns.
© UCLES 2019
Page 7 of 8
4
Cambridge IGCSE – Mark Scheme
May/June 2019
www.dynamicpapers.com
PUBLISHED
0478/23
Question
Answer
4
Marks
Statements
Validation
Range check
9
Verification
4
9
Double entry
Check digit
9
Presence check
9
1 mark for each correct row
Question
5
Answer
Marks
•
•
FOR … TO … NEXT
fixed number of repetitions
•
•
REPEAT … UNTIL
always executed // condition tested at end
•
•
WHILE … DO … ENDWHILE
may not be executed // condition tested at beginning
Question
6
Answer
Marks
6(a)
Number is repeated/not unique
1
6(b)
Three from:
Train number not displayed
Departure time before 8:30
Criteria of =Y for Platform not required/incorrect
All late trains will be shown/the condition should be on the line above
7
4 marks, one mark for each correct column
Field: Train Number
Table:
Platform
Departure Time
Status
TRAIN
TRAIN
TRAIN
TRAIN
;
;
> 08:30
= "Late"
Sort:
Show:
Criteria:
or:
© UCLES 2019
Page 8 of 8