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. Complete the following identifier table. Example value | Explanation | Variable name | Data type ------------------------------------------------------------------------------------------------------------------------------------------ "Wong" | The preferred name of the member joining the football club | | FALSE | A value to indicate whether an existing member of the club lives at the same address | | 19/02/1983 | When the member joined the football club | | 1345 | The number of points a member has earned. Members of the club earn points for different activities. | | (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 | Result ← Status AND INT(x/2) | Message ← "Done" + LENGTH(MyString) | (c) The following data items need to be stored for each student in a group: • student name (a string) • test score (an integer). State a suitable data structure and justify your answer. Structure .............................................................................................................................................................. Justification ...........................................................................................................................................................
- (a)Complete the following identifier table.[4]
- (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 | Result ← Status AND INT(x/2) | Message ← "Done" + LENGTH(MyString) | [5]
- (c)The following data items need to be stored for each student in a group: • student name (a string) • test score (an integer). State a suitable data structure and justify your answer. Structure .............................................................................................................................................................. Justification ...........................................................................................................................................................[3]
Mark scheme
Marking points from the official mark scheme (May/June 2021). The mark or mark type is shown in brackets.
- [1] (a) MemberName STRING
- [1] (a) FamilyMember BOOLEAN
- [1] (a) StartDate DATE
- [1] (a) Points INTEGER
- [1] (b) Result ← 2 & 4: Should be arithmetic operator (not &) // 2 and 4 should be CHAR / STRING
- [1] (b) SubString ← MID("pseudocode", 4, 1): NO ERROR
- [1] (b) IF x = 3 OR 4 THEN: Not Boolean values / incorrect operator // Condition incorrect
- [1] (b) Result ← Status AND INT(X/2): INT(X/2) doesn't evaluate to a boolean value / incorrect operator
- [1] (b) Message ← "Done" + LENGTH(MyString): Can't add string to number / "Done" is not a number
- [1] (c) Structure: Record
- [2] (c) Justification: Allows different data types; to be stored under one identifier
- [3] (c) Alternative: Two (1D) arrays; One of string, one of integer; Where same index links the name with the score
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →