Past-paper question · 2020 October-November · Paper 22 · Q4

Question 4 2020 · October-November · Paper 22 · 6 marks

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

Official answer for Question 4

✓
Any six from:

Question 6

✓
MP1
✓
Initialisation of Higher to 0 before the loop
✓
MP2
✓
Use of IF statement
✓
MP3
✓
Correct condition in IF statement
✓
MP4
✓
Correct counting statement inside loop
✓
MP5
✓
OUTPUT/PRINT statement with correct reference to Higher
✓
MP6
✓
Appropriate message in output
✓
MP7
✓
Correct location of OUTPUT and IF statements
✓
Higher ← 0
✓
FOR Count ← 1 TO 5000
✓
INPUT Number[Count]
✓
IF Number[Count] > 500
✓
THEN
✓
Higher ← Higher + 1
✓
ENDIF
✓
NEXT Count
✓
OUTPUT "There are ", Higher, " values that are greater than
✓
500"
✓
2210/22
✓
Cambridge O Level – Mark Scheme
✓
October/November
✓
PUBLISHED
✓
2020
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_w20_ms_22.pdf →

Show text version of question

Question 4

This pseudocode algorithm allows 5000 numbers to be entered and stored in an array called Number.

FOR Count 1 TO 5000 INPUT Number[Count] NEXT Count

Extend and re-write the algorithm using pseudocode to also count and output how many of the numbers stored in the array are greater than 500, using the variable Higher. Only output Higher once with an appropriate message.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[6]

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

Keep practising this topic