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

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

Question 2

✓
to find / output prime numbers
✓
… store prime numbers in an array

Mark scheme 0478_s22_ms_23.pdf →

Show text version of question

Question 4

Part (b)

Question 4

The pseudocode represents an algorithm.

The pre-defined function DIV gives the value of the result of integer division. For example, Y = 11 DIV 4 gives the value Y = 2

Count ←0 INPUT Limit FOR In ← ← 1 TO Limit Logic ← TRUE Test 2 INPUT Number REPEAT IF Number / Test = Number DIV Test

← THEN Logic FALSE ELSE Test ←Test + 1 ENDIF UNTIL NOT Logic OR Test >= Number DIV 2 IF Logic

← THEN

← Store[Count] Number Count Count + 1 ENDIF NEXT In FOR Out ← 0 TO Count - 1 OUTPUT Store[Out] NEXT Out

Part (b)

State the purpose of this algorithm.

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

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

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

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

[2]
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 0478_s22_qp_23.pdf

Keep practising this topic