Question 4(c) 2015 · May-June · Paper 23 · 10 marks
Reveal official mark-scheme answer


Official answer for Question 4
Part (c)
Part (c)
Mark as follows:
- Variables declared/commented (at least X2)
- Input of ‘ThisBank’ with prompt
Question 23
Question 23
Show text version of question
Question 4
Part (c)
Question 4
A programming language has the built-in function CONCAT defined as follows:
CONCAT(String1 : STRING, String2 : STRING [, String3 : STRING] ) RETURNS STRING For example: CONCAT("San", "Francisco") returns "SanFrancisco" CONCAT("New", "York", "City") returns "NewYorkCity"
The use of the square brackets indicates that the parameter is optional.
Part (c)
The complete data file is created with the structure shown.
00002▼001 The program will: 00003▼002 00004▼003
- input a bank code 00005▼101
- output a list of all the dispensers which belong to this bank 00006▼004
- output the total number of dispensers for this bank
00007▼004
00024▼002 00025▼003 An example of a run of the program is shown: 00026▼007 00027▼007 00028▼102 Enter bank code 007 00001 00011 00026 00027
There are 5 dispensers for this bank
Question 11
Write the program code. Do not attempt to include any validation checks. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type.
Programming language ............................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................[10]
Question 12
Why this question appears here
82% assigned-topic match · Programming › Programming basics
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s15_qp_23.pdf
