Past-paper question · 2024 May-June · Paper 21 · Q5

Question 5 2024 · May-June · Paper 21 · 5 marks

Original past-paper question for 5
Reveal official mark-scheme answer Official mark-scheme answer for 5

Official answer for Question 5

✓
One mark per mark point

Question 5

✓
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
✓
2210/21
✓
Cambridge O Level – Mark Scheme
✓
May/June 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s24_ms_21.pdf →

Show text version of question

Question 5

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]

Question 6

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Programming concepts

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 2210_s24_qp_21.pdf

Keep practising this topic