Past-paper question · 2019 October-November · Paper 23 · Q4(b)

Question 4(b) 2019 · October-November · Paper 23 · 4 marks

Original past-paper question for 4(B)
Original past-paper question for 4(B)
Reveal official mark-scheme answer Official mark-scheme answer for 4(B)

Official answer for Question 4

Part (b)

✓
Four from:

Question 4

✓
MP1 CASE statement with identifier Response
✓
MP2 Correct structure used for choices«
✓
MP3 «. correct statements used for choices
✓
MP4 OTHERWISE and correct statement
✓
MP5 Single ENDCASE included
✓
e.g.
✓
CASE OF Response // CASE Response OF
✓
1 : X ← X + Y
✓
2 : X ← X - Y
✓
3 : X ← X * Y
✓
4 : X ← X / Y
✓
OTHERWISE OUTPUT ″No response″
✓
ENDCASE
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_w19_ms_23.pdf →

Show text version of question

Question 4

Part (b)

Question 4

The following pseudocode algorithm uses nested IF statements.

IF Response = 1 THEN X X + Y ELSE IF Response = 2 THEN X X – Y ELSE IF Response = 3 THEN X X * Y ELSE IF Response = 4 THEN X X / Y ELSE OUTPUT "No response" ENDIF ENDIF ENDIF ENDIF

Part (b)

Re-write the pseudocode algorithm using a CASE statement.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

[4]

Question 10

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_w19_qp_23.pdf

Keep practising this topic