1.
a) Tick one option to show the name of the data structure used to store a collection of
data of the same data type. [1]
A Array
B Constant
C Function
D Variable
b) Tick one option to complete the sentence. [1]
A constant
A stores a value that can change at any time during the execution of a program.
B stores a value that cannot change during the execution of a program.
C stores values of multiple data types.
D stores values that must be of the same data type
c) Explain the purpose of the library routines MOD and RANDOM
MOD
...................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
..........
RANDOM
............................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
................ [4]
2. Describe what is meant by data validation.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
3. a Explain why verification checks are used when data is input.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(b) Give two types of verification check and state how each one can be used.
Verification check 1 ...................................................................................................................
Use ...........................................................................................................................................
...................................................................................................................................................
Verification check 2 ...................................................................................................................
Use ...........................................................................................................................................
...................................................................................................................................................
[4]
4.
(b) Write an algorithm in pseudocode to make sure that an input for the variable Length is
between 15 and 35 inclusive. The code must iterate until a valid input has been made and
the code must include appropriate messages.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
5. State two features that should be included to create a maintainable program. Give a
reason why each feature should be used.
1..................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
.......................
2..................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................... [4]
6. The function LENGTH(Phrase) calculates the length of a string Phrase (a) Write the
pseudocode statements to: • store the string "The beginning is the most important part" in
Phrase • calculate and output the length of the string • output the string in upper case.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
(b) Write the output your pseudocode should produce.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
9. Describe the purpose of test data. Include an example of a type of test data in your
answer. Description
.......................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
.................
Example
...........................................................................................................................................
....................................................................................................................................................
...... [3]
10.
11.
12.
13.
14.
15.
Describe the characteristics of the string and char data types and give an example of each.
String
................................................................................................................................................
....................................................................................................................................................
......
Example
...........................................................................................................................................
Char
.................................................................................................................................................
....................................................................................................................................................
......
Example
........................................................................................................................................... [4]