Computer Science (2210) · Oct/Nov 2017 · Mark scheme 22
Cambridge Computer Science (2210) mark scheme for paper 22, Oct/Nov 2017 — 2210/22/O/N/17, file 2210_w17_ms_22.pdf.
Text of this paper
Cambridge Assessment International Education
Cambridge Ordinary Level
COMPUTER SCIENCE
2210/22
Paper 2
October/November 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 International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes for the October/November 2017 series for most
Cambridge IGCSE®, Cambridge International A and AS Level components and some Cambridge O Level
components.
® IGCSE is a registered trademark.
This document consists of 8 printed pages.
© UCLES 2017
[Turn over
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
1(a)(i)
Answer
1 mark for appropriate variable name, 1 mark for appropriate data type, 1 mark for appropriate use.
October/November
2017
Marks
3
Many correct answers, they must be meaningful. These are examples only.
– HireTotal, integer, running total of money taken (for the day)
– HoursHired, real, running total of hours hired for the day
– Returned, real, hour and fraction of hour when next returned
1(a)(ii)
1 mark for appropriate constant name, 1 mark for appropriate value.
2
Many correct answers, they must be meaningful. These are examples only.
– HourPrice, 20.00
– HalfHourPrice 12.00
1(b)
1 mark for validation check, all checks must be different, 1 mark for the reason and 1 mark for the test data.
The only inputs for task 1 can be length of hire, money taken, time of hire and time of return.
There are many possible correct answers these are examples only.
Validation check
Reason
Test data
Validation check
Reason
Test data
© UCLES 2017
– range check for time of hire
– cannot be hired before 10:00 returned after 17:00
– 12:00, 19:00
– type check for money taken
– must be a numeric value
– 20.00, bob
Page 2 of 8
6
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
1(c)
October/November
2017
Answer
–
any loop for 10 boats
Marks
(1 mark)
Four from:
– Initialisation
– check HoursHired against MaxHoursHired «
« store the BoatNumber
« update MaxHoursHired if greater
– check if HoursHired = 0 …
… if so add 1 to NumberBoatsUnused
– update daily totals (for hours and money)
– output report with messages (including totals for hours and money, and number of boats unused and the most used
boat).
Max 4 marks
Example:
MaxHoursHired Å 0
TotalHoursHired Å 0
TotalMoney Å 0
NumberBoatsUnused Å 0
FOR BoatNumber Å 1 to 10
TotalMoney Å TotalMoney + Money(BoatNumber)
TotalHoursHired Å TotalHoursHired + HoursHired(BoatNumber)
IF HoursHired(BoatNumber) = 0
THEN NumberBoatsUnused Å NumberBoatsUnused + 1
ENDIF
IF HoursHired(BoatNumber) > MaxHoursHired
THEN
MostUsed Å BoatNumber
MaxHoursHired Å HoursHired(BoatNumber)
ENDIF
NEXT BoatNumber
PRINT "Boats were hired for ", TotalHoursHired, " hours"
PRINT "Total amount of money taken was ", TotalMoney
PRINT NumberBoatsUnused, " boats were not used"
Print "Boat number ", MostUsed, " was used most"
© UCLES 2017
Page 3 of 8
5
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
1(d)
October/November
2017
Answer
Maximum 4 marks in total for question part
4
e.g.
Explanation (may include reference to program statements)
– check all boats for«
– « return time < current time // current booking slot available or return time > current time// current booking slot not
available
– keep a running total of those available
– display number of boats
Example:
FOR BoatNumber Å 1 to 10
loop to check for all boats
IF ReturnTime(BoatNumber) <= CurrentTime check return time against current time
THEN BoatsAvailable Å BoatsAvailable + 1
keep a running total
ENDIF
NEXT BoatNumber
PRINT "Number of boats available ", BoatsAvailable
display number of boats
© UCLES 2017
Marks
Page 4 of 8
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
2
Answer
1 mark for each, there may be other solutions, award full marks for any working solution
any six from:
initialise total (outside loop)
Input number of numbers (outside loop with validation)
Loop using input value
Input number (inside loop)
Update Total (inside loop)
Calculate average
Print average and total (outside loop)
Sample algorithm:
INPUT NumberCount
Total Å 0
FOR Count Å 1 TO NumberCount
INPUT Number
Total Å Total + Number
NEXT
Average Å Total/NumberCount
PRINT Total, Average
© UCLES 2017
Page 5 of 8
October/November
2017
Marks
6
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
3
Answer
4
Marks
1 mark for each correct line, max 3 marks.
3
Data Structure
Description
Constant
A collection of related data.
Array
A value that can change whilst
a program is running.
Table
A value that never changes
whilst a program is running.
Variable
A series of elements of the
same data type.
Question
Answer
2 marks for identification, 1 mark for description, 1 mark for reason.
Identification:
CASE …
… OF … OTHERWISE … (ENDCASE)or
… OF … (OTHERWISE) … ENDCASE
Description:
– a statement that allows for multiple selections // not any of the above
Reason:
– to simplify pseudocode/ make pseudocode more understandable etc.
© UCLES 2017
October/November
2017
Page 6 of 8
Marks
4
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
Answer
5(a)
Accept
Reject
Count
0
0
0
1
50.4
2
2
50.3
3
49.1
3
4
50.3
4
5
50.0
5
6
49.5
6
7
50.2
7
8
50.3
8
9
50.5
10
50.6
2
© UCLES 2017
Å
(1 mark)
–
–
change to Is Count = 50?
remove IS Sack > 50.5?
ÆÅ
(1 mark)
ÆÅ
(1 mark)
Marks
Sack
1
1
5(b)
October/November
2017
ÆÅ
(1 mark)
5
OUTPUT
82
ÆÅ
(1 mark)
Æ
2
Page 7 of 8
2210/22
Cambridge O Level – Mark Scheme
PUBLISHED
Question
6(a)
October/November
2017
Answer
–
Marks
1 mark for each field suitable name, 1 mark for appropriate data type and appropriate data sample
6
The following are examples there are many different correct answers.
–
–
–
6(b)
6(c)
–
Engine Number, text, 21012
Class, text, P6
Service Date, date, 4/3/2017
Engine Number // Correct field number
Field: Engine Number
Table: TRAIN
1
Class
Service Date
TRAIN
TRAIN
3
Sort:
Show:
;
Criteria:
Like ‘P*’ // Like ‘P?’
<10/11/2016
or:
(1 mark)
© UCLES 2017
(1 mark)
(1 mark)
Page 8 of 8