Cambridge Assessment International Education: Computer Science 0478/21 May/June 2018
Cambridge Assessment International Education: Computer Science 0478/21 May/June 2018
Cambridge Assessment International Education: Computer Science 0478/21 May/June 2018
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 2018 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 approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
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.
• 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.
Marks awarded are always whole marks (not half marks, or other fractions).
• 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.
Rules must be applied consistently e.g. in situations where candidates have not followed instructions or in the application of generic level
descriptors.
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).
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.
Section A
1(a)(i) Many correct answers, they must be meaningful. The following is an example only: 4
Many correct answers, they must be meaningful. The following is an example only:
e.g. Three arrays containing string data with name, address and phone number – John Smith, Cambridge, 01223 123456
1(b) One mark for method, one mark for an extension or reason. 2
foundProc ← FALSE
count ← 1
WHILE NOT foundProc AND count <=3 DO
IF processor(estNo) = proc(count) AND stProc(count) > 0
THEN
foundProc ← TRUE
ENDIF
count ← count + 1
ENDWHILE
IF foundProc
THEN
foundRAM ← FALSE
IF RAM(estNO) = RAM1 AND stRAM1 >0
THEN
foundRAM ← TRUE
stRAM1 ← stRAM1 - 1
ENDIF
IF RAM(estNO) = RAM2 AND stRAM2 >0
THEN
foundRAM ← TRUE
stRAM2 ← stRAM2 - 1
ENDIF
ENDIF
IF NOT foundProc
THEN
OUTPUT "Processor out of stock"
ELSE
stProc(count) ← stProc(count) - 1
ENDIF
IF NOT foundRAM
THEN
OUTPUT "RAM out of stock"
ENDIF
Explanation
1 How the number of orders was calculated
2 Deal with the case where the estimate has not been turned into an order
3 Calculating the total number of each component sold
4 Details of method actually used to calculate numbers of components
5 How the total value of all the orders was calculated
6 Display summary
7 Display complete summary of number of orders, total number of components and total value of orders
Section B
zero ← 0
posCount ← 0
FOR count ← 1 TO 1000
INPUT number
IF number > 0
THEN posCount ← posCount + 1
ENDIF
IF number = 0
THEN zero ← zero + 1
ENDIF
NEXT
OUTPUT posCount, " positive numbers"
OUTPUT zero, " zeros"
2(b) Reduce the number of iterations to a manageable amount // Simulate the input (e.g. random generation) 1
3(a) Digit(1) Digit(2) Digit(3) Digit(4) Digit(5) Digit(6) Digit(7) Digit(8) Sum OUTPUT 5
5 7 0 1 2 3 4 6 44 GTIN-8
57012346
Digit(1) Digit(2) Digit(3) Digit(4) Digit(5) Digit(6) Digit(7) Digit(8) Sum OUTPUT
4 3 1 0 2 3 1 0 30 GTIN-8
43102310
Or
6(a) Fields 5 2
Records 8