Skip to main content
O-LevelComputer ScienceProgramming2210/21 · May/June 2024 · Q55 Marks

Write the pseudocode statements to perform this task: • accept the input of a whole number from 1 to 4 inclusive • use a CASE statement to: Ο output the number (1 to 4 inclusive) that was entered Ο output the word "ERROR” if a 1 to 4 inclusive number was not entered.

  1. Write the pseudocode statements to perform this task: • accept the input of a whole number from 1 to 4 inclusive • use a CASE statement to: Ο output the number (1 to 4 inclusive) that was entered Ο output the word "ERROR” if a 1 to 4 inclusive number was not entered.[5]

Mark scheme

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

  1. [5] One mark per mark point MP1 Correct input statement with appropriate variable MP2 Elements of selection statement present - CASE OF ENDCASE MP3 At least one correct branch in the case statement MP4 All branches from 1 to 4 correct MP5 Correct use of OTHERWISE with correct output. For example: INPUT Number CASE OF Number 1: OUTPUT Number 2: OUTPUT Number 3 : OUTPUT Number 4 : OUTPUT Number OTHERWISE OUTPUT "ERROR" ENDCASE Or INPUT Number CASE OF Number 1 : OUTPUT 1 2 : OUTPUT 2 3 : OUTPUT 3 4 : OUTPUT 4 OTHERWISE OUTPUT "ERROR" ENDCASE

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, O-Level Computer Science (syllabus 2210). Structured question, 5 marks.
Source
O-Level Computer Science, May/June 2024 Paper 2 Variant 1, 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