Past-paper question · 2022 May-June · Paper 21 · Q4(b)

Question 4(b) 2022 · May-June · Paper 21 · 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)

✓
One mark per mark point, max four

Question 4

✓
MP1
✓
appropriate conditional loop structure
✓
MP2
✓
correct identification of invalid input
✓
MP3
✓
appropriate error message
✓
MP4
✓
repeated input of score until correct
✓
WHILE Score < 0 OR Score > 100 (DO)
✓
OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
✓
INPUT Score
✓
ENDWHILE
✓
Or:
✓
REPEAT
✓
IF Score < 0 OR Score > 100
✓
THEN
✓
OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
✓
INPUT Score
✓
ENDIF
✓
UNTIL Score >= 0 AND Score <= 100
✓
2210/21
✓
Cambridge O Level – Mark Scheme
✓
May/June 2022
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s22_ms_21.pdf →

Show text version of question

Question 4

Part (b)

Question 4

The flowchart shows an algorithm that should allow 60 test results to be entered into the variable

Score. Each test result is checked to see if it is 50 or more. If it is, the test result is assigned to the Pass array. Otherwise, it is assigned to the Fail array.

Part (b)

Write a pseudocode routine that will check that each test result entered into the algorithm is

between 0 and 100 inclusive.

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

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

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

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

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

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

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

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

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

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

[4]

Question 10

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

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

Keep practising this topic