Refer to the insert for the list of pseudocode functions and operators. A programmer is testing a program using an Integrated Development Environment (IDE). The programmer wants the program to stop when it reaches a specific instruction or program statement in order to check the value assigned to a variable.
- (a)Give the technical term for the position at which the program stops.[1]
- (b)The following table lists some activities from the program development life cycle. Complete the table by writing the life cycle stage for each activity. Activity Life cycle stage An identifier table is produced. Syntax errors can occur. The developer discusses the program requirements with the customer. A trace table is produced.[4]
- (c)An identifier table includes the names of identifiers used. State two other pieces of information that the identifier table should contain. 1 2[2]
- (d)The pseudocode statements in the following table may contain errors. State 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 Status ← TRUE AND FALSE IF LENGTH("Password") < "10" THEN Code ← LCASE ("Electrical") Result ← IS_NUM(-27.3)[4]
Mark scheme
Marking points from the official mark scheme (May/June 2022). The mark or mark type is shown in brackets.
- [1] Correct answer only: Breakpoint
- [1] One mark per row
- Activity | Life cycle stage
- An identifier table is produced. | Design
- Syntax errors can occur. | Coding
- The developer discusses the program requirements with the customer. | Analysis
- A trace table is produced. | Testing
- [2] One mark per bullet point to Max 2
- • A description of what the identifier is used for / the purpose of the identifier
- • The data type of the identifier
- • The number of elements of an array // the length of a string
- • An example data value
- • Value of any constants used
- • The scope of the variable (local or global)
- [4] One mark per row
- Statement | Error
- Status ← TRUE AND FALSE | NO ERROR
- IF LENGTH("Password") < "10" THEN | "10" shouldn't be a string // must be an integer
- Code ← LCASE("Electrical") | Parameter must be a char // cannot be a string
- Alternative: LCASE should be TO_LOWER
- Result ← IS_NUM(-27.3) | Parameter must be a string / char // cannot be a number
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 →