Past-paper question · 2022 October-November · Paper 21 · Q2(b)

Question 2(b) 2022 · October-November · Paper 21 · 3 marks

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

Official answer for Question 2

Part (b)

✓
One mark per mark point, max three

Question 3

✓
•
✓
use an IF/conditional statement
✓
•
✓
to check if Reading[Count] not equal to zero
✓
•
✓
before outputting the value // between statements 17 and 18 // code sample showing position
✓
IF Reading[Count] <> 0
✓
THEN
✓
OUTPUT
✓
ENDIF
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w22_ms_21.pdf →

Show text version of question

Question 2

Part (b)

Question 2

An algorithm has been written to:

  • set 100 elements of the array Reading[1:100] to zero
  • input integer values between 1 and 100
  • end the process with an input of –1
  • reject all other values
  • count and output the number of times each value is input, starting with the largest value.

Part (b)

Describe how the algorithm could be changed so that it does not output any counts of zero.

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

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

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

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

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

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

[3]

Question 10

Topic relevance

Why this question appears here

54% 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_w22_qp_21.pdf

Keep practising this topic