Past-paper question · 2017 May-June · Paper 22 · Q4(a)

Question 4(a) 2017 · May-June · Paper 22 · 2 marks

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

Official answer for Question 4

Part (a)

✓
Error
  • Count
✓
0

Question 2

✓
Correction
  • Count

Question 1

✓
or
✓
Error
  • UNTIL Count > 100
✓
Correction
  • UNTIL Count >= 100 or UNTIL Count = 100
✓
or
✓
UNTIL Count > 99

Mark scheme 2210_s17_ms_22.pdf →

Show text version of question

Question 4

Part (a)

Question 4

An algorithm has been written in pseudocode to input 100 numbers and print out the sum.

A
REPEAT … UNTIL loop has been used.

Count ← 0 Sum ← 0 REPEAT INPUT Number Sum ← Sum + Number Count ← Count + 1 UNTIL Count > 100 PRINT Sum

Part (a)

Find the error in the pseudocode and suggest a correction.

Error ...........................................................................................................................................

Correction .................................................................................................................................

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

[2]
Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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

Keep practising this topic