Computer Assignmnet AS 4
Computer Assignmnet AS 4
Refer to the insert for the list of pseudocode functions and operators.
1 (a) A program is being developed to help manage the membership of a football club.
Example
Explanation Variable name Data type
value
(b) Each pseudocode statement in the following table may contain an error due to the incorrect
use of the function or operator.
Describe the error in each case, or write ‘NO ERROR’ if the statement contains no error.
You can assume that none of the variables referenced are of an incorrect type.
Statement Error
Result 2 & 4
SubString MID("pseudocode", 4, 1)
IF x = 3 OR 4 THEN
[5]
2. A program will:
[6]
© UCLES 2021 9618/23/M/J/21
10
3 Study the following pseudocode. Line numbers are for reference only.
Result Convert("∇in∇a∇∇Cup")
Note: The symbol '∇' has been used to represent a space character.
Use this symbol for any space characters in the trace table.
"∇in∇a∇∇Cup"
[5]
...................................................................................................................................................
Justification ...............................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[2]
Change 1: Convert to lower case any character that is not the first character after a space.
Change 2: Replace multiple spaces with a single space.
...........................................................................................................................................
.......................................................................................................................................[1]
Write the number of the line to be moved and state its new position.
...........................................................................................................................................
[2]
STRING Functions
NUMERIC Functions