Computer Science (0478) · May/June 2017 · Mark scheme 22

Cambridge Computer Science (0478) mark scheme for paper 22, May/June 2017 — 0478/22/M/J/17, file 0478_s17_ms_22.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International General Certificate of Secondary Education

COMPUTER SCIENCE

0478/22

Paper 2

May/June 2017

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 will not enter into discussions about these mark schemes.
Cambridge is publishing the mark schemes for the May/June 2017 series for most Cambridge IGCSE®,
Cambridge International A and AS Level and Cambridge Pre-U components, and some Cambridge O Level
components.

® IGCSE is a registered trademark.
This syllabus is approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.

This document consists of 6 printed pages.
© UCLES 2017

[Turn over

May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED

0478/22

Question
1(a)(i)

Answer
One variable name MUST relate to the cost of the outing in Task 1
Variable name
Data type to match variable
Description of the use of the given variable

Marks
3
(1)
(1)
(1)

Many correct answers, they must be meaningful. This is an example only.
NoSeniorCitizens (1), integer (1), number of senior citizens that
want to go on the outing (1)
1(a)(ii)

Two constants required, for each constant
Name
Value
Use

6
(1)
(1)
(1)

Many correct answers, they must be meaningful. These are examples only.
MinNoSeniorCitizens (1), 10 (1), minimum number of senior
citizens that can go on the outing (1)
MaxNoSeniorCitizens (1), 36 (1), maximum number of senior
citizens that can go on the outing (1)
Max 6 marks
1(b)

-

© UCLES 2017

calculate cost of carers // if more than 24 senior citizens on the trip cost
is 60 otherwise cost is 40
add to the cost of the outing

Page 2 of 6

2

0478/22

May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED

Question

Answer

1(c)

Any five from:
loop for number of senior citizens on the trip
input with prompts name and amount paid
store name and amount paid in appropriate place in arrays
total the amount paid
check if spare places are available
if spare place is required remove a spare place//fill spare places
add name(s) to list in appropriate place(s)
store names of two carers
If number of senior citizens > 24 store name of third carer
Max 5 marks

Marks
5

Example
TotalPaid
0
FOR Counter
1 TO NoSenCit
PRINT "Please Enter Name"
INPUT SenCitName[Counter]
PRINT "Please Enter amount paid"
INPUT SenCitAmount[Counter]
TotalPaid
TotalPaid + Amount
NEXT Counter
Extras
TRUE
WHILE NoSenCit < 36 and Extras
PRINT "Do you want to add another person? Y/N"
INPUT Answer
IF Answer = "Y"
THEN
NoSenCit
NoSenCit + 1
PRINT "Please Enter Name"
INPUT SenCitName[NoSenCit]
ELSE Extras
FALSE
ENDIF
ENDWHILE
PRINT "Please Enter Name of First Carer"
INPUT Carer1
PRINT "Please Enter Name of Second Carer"
INPUT Carer2
IF NoSenCit > 24
THEN
PRINT "Please Enter Name of Third Carer"
INPUT Carer3
ENDIF
1(d)

© UCLES 2017

Explanation (any programming statements must be fully explained)
check total cost
««against total amount paid
if total cost < total amount paid display/show profit
if total cost = total amount paid display/show break even

Page 3 of 6

4

May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED

0478/22

Question
2(a)

Answer

Marks

award full marks for any working solution
Input three numbers
Attempt to select largest number
Working method
print out largest number

4
(1)
(1)
(1)
(1)

Sample algorithm
INPUT Num1, Num2, Num3
IF (Num1 > Num2) AND (Num1 > Num3) THEN PRINT Num1
ENDIF
IF (Num2 > Num1) AND (Num2 > Num3) THEN PRINT Num2
ENDIF
IF (Num3 > Num1) AND (Num3 > Num2) THEN PRINT Num3
ENDIF
or
INPUT Num1
Big
Num1
INPUT Num2, Num3
IF Num2 > Big THEN Big
IF Num3 > Big THEN Big
PRINT Big
2(b)

Num2 ENDIF
Num3 ENDIF

1 mark for each data set and 1 mark for the matching reason.

4

There are many possible correct answers, these are examples only.
Test data set 1:
Reason:

30, 29, 28
first number is the largest

Test data set 2:
Reason:

x, y, z
abnormal data, should be rejected
Max 4 marks

© UCLES 2017

Page 4 of 6

May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED

0478/22

Question

Answer

3

Weight

Reject

Total Weight

0

0

13

13

17

30

26

55

5

60

10

70

15

85
105

(1 mark)

85

Weight of items 85 Number of
items rejected 2

(1 mark to 1st
85)
(1 mark 105, 85)

(1 mark)

Question
4(a)

Answer
Error
Correction
or
Error
Correction
or

5

2

20

( 1mark)

OUTPUT

1

25

35

Marks

- Count
- Count

0
1

Marks
2

- UNTIL Count > 100
- UNTIL Count >= 100 or UNTIL Count = 100
UNTIL Count > 99

4(b)

-

use of FOR with correct start and end values «
« use of NEXT
« removal of increment for Count

3

Sample algorithm
Sum
0
FOR Count
1 TO 100
INPUT Number
Sum
Sum + Number
NEXT // NEXT Count
PRINT Sum
5(a)

for each field name (1), data type and sample (1)
The following are examples there are many different correct answers.
EarTag (1), text, EAR1011 (1)
DOB (1), date, 4/3/2017 (1)
Gender (1), text, M (1)
Weight (1), number, 5.9 (1)

© UCLES 2017

Page 5 of 6

8

May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED

0478/22

Question
5(b)
5(c)

Answer

Marks

EarTag
Field:

1
EarTag

Table: SHEEP

Gender
SHEEP

3

Weight
SHEEP

Sort:
Show:

;

Criteria:

†
=’M’

†
> 10

or:
(1 mark)

© UCLES 2017

(1 mark)

Page 6 of 6

(1 mark)

†

Advertisement