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

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

Question 3

✓
MP1
✓
Correct loop, including counter if not a FOR loop
✓
MP2
✓
Correct output of Score[]
✓
MP3
✓
Correct output of Grade[]
✓
MP4
✓
Suitable messages/text in output for both arrays
✓
Example answers
✓
Count ← 0
✓
REPEAT
✓
PRINT "Student: ", Count, " Mark: ", Score[Count], " Grade: ",Grade[Count]
✓
Count ← Count + 1
✓
UNTIL Count = 30
✓
Count ← 0
✓
WHILE Count < 30 DO
✓
PRINT "Student: ", Count, " Mark: ", Score[Count], " Grade: ",Grade[Count]
✓
Count ← Count + 1
✓
ENDWHILE
✓
FOR Count ← 0 TO 29
✓
PRINT "Student: ", Count, " Mark: ", Score[Count], " Grade: ", Grade[Count]
✓
NEXT
✓
2210/21
✓
Cambridge O Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s21_ms_21.pdf →

Show text version of question

Question 4

Part (b)

Question 4

The pseudocode algorithm shown has been written by a teacher to enter marks for the students in

her class and then to apply some simple processing.

Count 0 ← REPEAT INPUT Score[Count] IF Score[Count] >= 70 THEN Grade[Count] "A" ← ELSE IF Score[Count] >= 60 THEN Grade[Count] "B" ← ELSE IF Score[Count] >= 50 THEN Grade[Count] "C" ← ELSE IF Score[Count] >= 40 THEN Grade[Count] "D" ← ELSE IF Score[Count] >= 30 THEN Grade[Count] "E" ← ELSE Grade[Count] "F" ← ENDIF ENDIF ENDIF ENDIF ENDIF Count ← Count + 1 UNTIL Count = 30

Part (b)

Write the pseudocode to output the contents of the arrays Score[] and Grade[] along with

suitable messages.

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

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

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

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

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

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

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

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

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

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

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

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

[3]
Topic relevance

Why this question appears here

99% 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_s21_qp_21.pdf

Keep practising this topic