Computer Science (0478) · May/June 2015 · Mark scheme 21
Cambridge Computer Science (0478) mark scheme for paper 21, May/June 2015 — 0478/21/M/J/15, file 0478_s15_ms_21.pdf.
Text of this paper
www.dynamicpapers.com
CAMBRIDGE INTERNATIONAL EXAMINATIONS
Cambridge International General Certificate of Secondary Education
MARK SCHEME for the May/June 2015 series
0478 COMPUTER SCIENCE
0478/21
Paper 2 (Written), maximum raw mark 50
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 will not enter into discussions about these mark schemes.
Cambridge is publishing the mark schemes for the May/June 2015 series for most
Cambridge IGCSE®, Cambridge International A and AS Level components and some
Cambridge O Level components.
® IGCSE is the registered trademark of Cambridge International Examinations.
www.dynamicpapers.com
Page 2
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
Section A
1
(a) (i) Many correct answers, they must be meaningful. These are examples only.
– MiddayTemperature[1:30]
or MiddayTemperature[0:29]
or MiddayTemperature[30]
or MiddayTemperature[29]
or MiddayTemperature[]
(1 mark)
– MidnightTemperature[1:30]
or MidnightTemperature[0:29]
or MidnightTemperature[30]
or MidnightTemperature[29]
or MidnightTemperature[]
(1 mark)
(ii) Answers, must match above and the upper bound should have been changed from
30 to 7 or 29 to 6 or no change if not used. These are examples only.
– MiddayTemperature[1:7] MidnightTemperature[1:7]
or MiddayTemperature[7] MidnightTemperature[7]
[2]
[1]
(iii) Any two variables with matching reasons, 1 mark for the variable and 1 mark
for the matching reason. The variables and the matching reasons must relate to
the tasks in the pre-release. There are many possible correct answers these are
examples only.
Variable
– Counter: (Integer)
Reason
– to use as a loop counter when entering the temperature
Variable
Reason
–
–
HighNoon: (Real)
to store the highest midday temperature
© Cambridge International Examinations 2015
[4]
www.dynamicpapers.com
Page 3
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
(b) If loop used
– initialisation before loop
– loop
– running total inside loop
– calculation of average outside loop
– output of average with message outside loop
(Max 4 marks)
–
completion of at least 3 of initialisation, running total, calculation of average and
output of average with message for both midday and midnight
(1 mark)
[5]
sample algorithm:
MiddayTotal ← 0; MidnightTotal ← 0
FOR Count ← 1 TO 7
MiddayTotal ← MiddayTotal + MiddayTemperature[Count]
MidnightTotal ← MidnightTotal + MidnightTemperature[Count]
NEXT Count
MiddayAverage ← MiddayTotal/7
MidnightAverage ← MiddayTotal/7
PRINT 'The average midday temperature is ', MiddayAverage
PRINT 'The average midnight temperature is ', MidnightAverage
If loop not used
– total of 7 midday temperatures
– calculation of midday average (Note could be combined as one calculation,
see example below)
– total of 7 midnight temperatures
– calculation of midnight average (Note could be combined as one calculation,
see example below)
– output of both averages with suitable messages
sample algorithm:
MiddayAverage ← (MiddayTemperature[1]+ MiddayTemperature[2]+
MiddayTemperature[3]+ MiddayTemperature[4]+
MiddayTemperature[5]+ MiddayTemperature[6]+
MiddayTemperature[7])/7
MidnightAverage ← (MidnightTemperature[1]+
MidnightTemperature[2]+ MidnightTemperature[3]+ Midnight[4]+
Midnight[5]+ Midnight[6]+ MidnightTemperature[7])/7
PRINT 'The average midday temperature is ', MiddayAverage
PRINT 'The average midnight temperature is ', MidnightAverage
© Cambridge International Examinations 2015
[5]
www.dynamicpapers.com
Page 4
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
(c) 1 mark for the data set and 1 mark for the matching reason.
There are many possible correct answers, these are examples only.
Data set
– 30, 29, 28, 31.5, 32.3, 33, 29.7
Reason
– normal data that should be accepted
Data set
Reason
–
–
twenty, 23.99, seventeen, 501, –273, @#@, seventy seven
abnormal data that should be rejected
[2]
(d) Maximum 6 marks in total for question part
Explanation (max 6)
– set variable called HighestMidday to a large minus number
– loop (30 or 7) times to check each midday temperature in turn
– check midday temperature against HighestMidday / midday temperature >
HighestMidday
– …replace value in HighestMidday by midday temperature
– …store array index in MiddayMonthDay/MiddayWeekday
– output HighestMidday outside the loop
– output MiddayMonthDay/MiddayWeekday outside the loop
Sample algorithm (max 4):
HighestMidday ← -999
FOR Count ← 1 TO 7
IF MiddayTemperature [Count] > HighestMidday
THEN HighestMidday ← MiddayTemperature[Count]
MiddayMonthDay/MiddayWeekday ← Count
ENDIF
NEXT Count
PRINT 'The highest midday temperature was ',HighestMidday, ' on
day ', Count
If pseudocode or programming only and no explanation, then maximum 4 marks
© Cambridge International Examinations 2015
[6]
www.dynamicpapers.com
Page 5
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
Section B
2
1 mark for each error identified + suggested correction
Line 1 or Small = 0: this should read Small = 999
line 5 or IF…:
this should read IF Num < Small THEN Small = Num
line 8 or UNTIL:
this should read UNTIL Counter = 10 or
UNTIL Counter > = 10 or
UNTIL Counter > 9
line 7 or PRINT…:
PRINT Small should come after the end of the repeat loop
or
line 8 or UNTIL:
this should come before line 7
[4]
3
Total
Reject
0
0
1.8
Weight
1.8
1
26.0
8.8
7.0
20.1
11.3
30.1
10.0
32.6
2.5
2
25.2
37.6
5.0
57.4
19.8
3
(2 marks)
(–1 for each error)
(then follow though)
Output
(1 mark)
29.3
–1
57.4, 3
1 mark)
(1 mark)
(allow follow through)
(from Total and Reject)
[5]
© Cambridge International Examinations 2015
www.dynamicpapers.com
Page 6
4
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
1 mark for each correct link, up to maximum of 4 marks
Integer
'a'
Real
2
Char
2.0
String
True
Boolean
'Twelve'
[4]
5
6
7
Any two points from
– a variable is used to store data that can change during the running of a program
– a constant is used to store data that will not be changed during the running of a
program
[2]
–
–
–
[3]
FOR (… TO … NEXT)
REPEAT (… UNTIL)
WHILE (… DO … ENDWHILE)
(a) –
7
[1]
(b) –
–
Brochure No
Uniquely identifies each property
[2]
(c) Garage
Number of Bedrooms
Price in $
(d) 399000
450000
–
–
–
Boolean
Number/Integer/Single
Number/Single/Real/Currency
H13
H10
[3]
[2]
© Cambridge International Examinations 2015
www.dynamicpapers.com
Page 7
Mark Scheme
Cambridge IGCSE – May/June 2015
Syllabus
0478
Paper
21
(e)
Field:
Property Type
Garage
Price in $
Brochure No
Table:
PROPERTY
PROPERTY
PROPERTY
PROPERTY
True
< 200000
Sort:
Show:
Criteria:
or:
or
Field:
Property Type
Garage
Price in $
Brochure No
Table:
PROPERTY
PROPERTY
PROPERTY
PROPERTY
Yes
< 200000
Sort:
Show:
Criteria:
or:
or
Field:
Property Type
Garage
Price in $
Brochure No
Table:
PROPERTY
PROPERTY
PROPERTY
PROPERTY
=Yes
< 200000
Sort:
Show:
Criteria:
or:
or
Field:
Property Type
Garage
Price in $
Brochure No
Table:
PROPERTY
PROPERTY
PROPERTY
PROPERTY
=-1
< 200000
(1 mark)
(1 mark)
Sort:
Show:
Criteria:
or:
(1 mark)
(1 mark)
[4]
© Cambridge International Examinations 2015