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

Question 4(b) 2017 · May-June · Paper 22 · 3 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)

✓
use of FOR with correct start and end values «

Question 3

✓
-
✓
« use of NEXT
✓
-
✓
« removal of increment for Count
✓
-
✓
Sample algorithm
✓
Sum
✓
0
✓
FOR Count
✓
1 TO 100
✓
INPUT Number
✓
Sum
✓
Sum + Number
✓
NEXT // NEXT Count
✓
PRINT Sum

Mark scheme 2210_s17_ms_22.pdf →

Show text version of question

Question 4

Part (b)

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 (b)

Rewrite the correct algorithm using a more suitable loop structure.

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

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

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

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

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

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

...............................................................................................................................................[3]

Question 11

Topic relevance

Why this question appears here

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

Keep practising this topic