Past-paper question · 2021 May-June · Paper 22 · Q2(a)

Question 2(a) 2021 · May-June · Paper 22 · 6 marks

Original past-paper question for 2(A)
Reveal official mark-scheme answer Official mark-scheme answer for 2(A)

Official answer for Question 2

Part (a)

✓
Any six from:

Question 6

✓
MP1 Initialisation of large and small variables e.g. Large ← 0 Small ← 1000
✓
MP2 Use of a loop for 500 entries // or 499 if initialisation done on first correct entry
✓
MP3 Input with prompt
✓
MP4 Attempt at checking the range of 1 to 999 for input
✓
MP5 … working range check
✓
MP6 Checking for a whole number
✓
MP7 Selecting largest number
✓
MP8 Selecting smallest number
✓
MP9 Calculating the range
✓
MP10 Outputting the largest, smallest and range with message
✓
Large ← 0
✓
Small ← 1000
✓
FOR Count ← 1 TO 500
✓
REPEAT
✓
OUTPUT "Enter a whole number between 1 and 999"
✓
INPUT Number
✓
UNTIL Number >= 1 AND Number < 1000 AND Number = Number DIV 1
✓
IF Number < Small
✓
THEN
✓
Small ← Number
✓
ENDIF
✓
IF Number > Large
✓
THEN
✓
Large ← Number
✓
ENDIF
✓
NEXT
✓
Range ← Large – Small
✓
OUTPUT "Largest number is ", Large, " Smallest number is ", Small, " Range of numbers is
✓
", Range
✓
2210/22
✓
Cambridge O Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_s21_ms_22.pdf →

Show text version of question

Question 2

Part (a)

Write an algorithm in pseudocode to input 500 positive whole numbers. Each number input must be less than 1000. Find and output the largest number input, the smallest number input and the range (difference between the largest number and smallest number).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[6]

Question 9

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

Keep practising this topic