Skip to main content
A-LevelComputer ScienceProgramming9618/22 · May/June 2024 · Q56 Marks

A program is being designed in pseudocode. The program contains a global 1D array Data of type string containing 200 elements. The first element has the index value 1. A procedure Process() is written to initialise the values in the array: PROCEDURE Process(Label : STRING) DECLARE Index : INTEGER Index ← 0 INPUT Data [Index] WHILE Index < 200 Index ← Index + 1 CASE OF (Index MOD 2) 0: Data [Index] ← TO_UPPER(Label) 1 : Data[Index] ← TO_LOWER(Label) OTHERWISE : OUTPUT "Alarm 1201" ENDCASE NEXT Index OUTPUT "Completed " & Index & " times" ENDPROCEDURE

  1. (a)(i)The pseudocode contains two syntax errors and one other error. Identify the errors. Syntax error 1 ................................ Syntax error 2 ................................ Other error ................................[3]
  2. (a)(ii)The procedure contains a statement that is not needed. Identify the pseudocode statement and explain why it is not needed. Statement ................................ Explanation ................................[2]
  3. (b)After correcting all syntax errors, the pseudocode is translated into program code which compiles without generating any errors. When the program is executed it unexpectedly stops responding. Identify the type of error that has occurred.[1]

Mark scheme

Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.

  1. [3] One mark per error:
  2. Syntax: 1. NEXT Index (should be ENDWHILE)
  3. Syntax: 2. '&' used to concatenate an integer (in OUTPUT statement)
  4. Other: 3. Accesses element outside range // Accesses element 0
  5. [2] One mark per point:
  6. Statement: • The OTHERWISE statement
  7. Explanation: • The result of MOD 2 can only be 0 or 1
  8. [1] Run-time

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 →

About this question

Topic
Programming, A-Level Computer Science (syllabus 9618). Structured question, 6 marks.
Source
A-Level Computer Science, May/June 2024 Paper 2 Variant 2, question 5.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep