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.
- 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.
- [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 →