Computer Science (0478) · May/June 2017 · Mark scheme 23
Cambridge Computer Science (0478) mark scheme for paper 23, May/June 2017 — 0478/23/M/J/17, file 0478_s17_ms_23.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International General Certificate of Secondary Education
COMPUTER SCIENCE
0478/23
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 7 printed pages.
© UCLES 2017
[Turn over
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
0478/23
Question
1(a)(i)
Answer
Marks
1 mark for two meaningful names of constants
1 mark for two relevant values related to Task 1
(1)
(1)
2
Many correct answers, they must be meaningful. These are examples only.
Coach_cost, 550
Ticket_cost, 30
Max_Students, 45
Free_Ticket, 10 (allow 9)
1(a)(ii)
1 mark for Any meaningful name AND purpose related to Task 2
2
Many correct answers, they must be meaningful. These are examples only.
Students / ArrayStudents to store the students’ names
paid / arrayPaid to record whether a student has paid or not
(1)
(1)
Max 2 marks
1(b)
Any five from:
Initialise values for both coach and ticket
Prompt for number of students taking part and input of number
Attempt at validation
Working validation for the entry for the number of students covering
both ends of the range
Working out the number of free ticket(s)
Calculation of total cost of tickets including consideration of free tickets
Calculation of actual cost per student including coach
Output of cost to be charged with suitable annotation
Example
Coach
550
Ticket
30
PRINT "Please enter the number of students taking part "
INPUT NumberOfStudents
WHILE NumberOfStudents <= 0 OR NumberOfStudent > 45
PRINT "Your number of students is out of range, please
try again"
INPUT NumberOfStudents
ENDWHILE
FreeTickets
NumberOfStudents DIV 10
TotalCostTickets
(NumberOfStudents – FreeTickets) *
Ticket
CostPerStudent
(Coach + TotalCostTickets) /
NumberOfStudents
PRINT "The cost to be charged to each student is $",
CostPerStudent
© UCLES 2017
Page 2 of 7
5
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
0478/23
Question
1(c)(i)
Answer
Marks
1 mark for check and 1 mark for related description
4
Task 1
Many correct answers, they must relate to the pre-release task. These are
examples only.
Type/Character check to make sure only integers are entered for number of
students
Range/Limit check to make sure the number of students entered is not too
large or small
Presence check to make sure an entry has been made (for the number of
students)
Task 2
Many correct answers, they must relate to the pre-release task. These are
examples only.
Type/Character check to make sure only letters are entered for names of
students
Length check to make sure the name entered is not too long
Presence check to make sure an entry has been made (for a student name)
Max 4 marks
1(c)(ii)
1 mark for appropriate test data and 1 mark for related reason
4
Task 1
Many correct answers, they must relate to the pre-release task and part
(c)(i). These are examples only.
Test data: –50 for number of students
Reason:
To check that negative values for number of students are
rejected
Task 2
Many correct answers, they must relate to the pre-release task and part
(c)(i). These are examples only.
Test data: Smith@ for name
Reason:
To check that invalid characters are rejected in names
Max 4 marks
© UCLES 2017
Page 3 of 7
0478/23
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
Question
Answer
1(d)
Any three from:
- Explanation of how the actual total costs are calculated – (cost of coach
and cost of tickets)
- Explanation of how the actual total income is calculated – (totalled
money collected from students)
- Explanation to show how the profit or loss is calculated – (total income
– total expenditure)
- Indicate whether a profit, break even, or loss has been made
© UCLES 2017
Page 4 of 7
Marks
3
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
0478/23
Question
2
Answer
Marks
1 mark for each error identified and suggested correction (the corrected
code must be written in full)
Line 2 Correct code Counter = 0
(1)
Line 7 Correct code Total = Total + Number // Number + Total
(1)
Line 10 Correct code Average = Total / Counter //
Average = Total / 50
(1)
Answer
Marks
Must match question.
2 marks for three suitable sub system names
1 mark for two suitable sub system names
Question
4
2
Answer
Marks
1 mark for each correct answer
4
Statements
Validation
To automatically check the accuracy of a bar
code
9
To check if the data input is sensible
9
To check if the data input matches the data
that has been supplied
To automatically check that all required data
fields have been completed
© UCLES 2017
(1)
Line 8 Correct code Counter = Counter + 1 // 1 + Counter
Question
3
4
Page 5 of 7
Verification
9
9
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
0478/23
Question
Answer
Marks
5(a)
Any two from:
Loop with 300 repetitions (starting at 1) / Loops from 1 to 300
Values input/stored (in consecutive/different locations) in an array (at
position I)
Increases the loop counter/I value by 1 (and returns to the start of the
loop)
2
5(b)
Any one from:
REPEAT (… UNTIL)
WHILE (… DO … ENDWHILE)
1
5(c)
-
Prompt and input number
Checking the input number is between 0 and 100 - both limits
Correct error message
(1)
(1)
(1)
3
Many correct algorithms. This is an example only.
OUTPUT "Enter a number between 0 and 100 "
INPUT Number
IF Number < 0 OR Number > 100
THEN
OUTPUT "The number you have entered is outside the
specified range"
ENDIF
Question
6
Answer
HighF
HighC
–100
–100
TempF
Marks
OUTPUT
68
68
18
46
68
18
50
68
18
86
86
27
65
86
27
50
86
27
40
86
27
30
86
27
–1
(1 Mark)
(1 Mark)
(1 Mark)
The highest temperature is, 86
Fahrenheit, 27 Celsius.
(2 Marks – see below)
The literal correct output is “The highest temperature is, 86 Fahrenheit, 27
Celsius.”
1 mark for values 86 and 27, 1 mark for correct output words, spacing and
punctuation.
© UCLES 2017
Page 6 of 7
5
May/June 2017
Cambridge IGCSE – Mark Scheme
www.dynamicpapers.com
PUBLISHED
0478/23
Question
7(a)
7(b)
Answer
Marks
Any one from:
It is the primary key/key field with unique data
(Fixed length) text field with alphanumeric data
Field name
Data type
ScreenSize
Number
3D
Boolean
CurvedFlat
Text
Internet
Boolean
HDD
Boolean
Price
Currency
1
3
1 mark for every two correct data types
7(c)
Field: TVID
Table: TVSTOCK
ScreenSize CurvedFlat
HDD
Price
TVSTOCK
TVSTOCK
TVSTOCK
TVSTOCK
Sort:
Show:
Ascending
;
;
Criteria:
=“CV”
;
YES
or:
(1 Mark)
© UCLES 2017
(1 Mark)
(1 Mark)
Page 7 of 7
(1 Mark)
(1 Mark)
5