Past-paper question · 2024 October-November · Paper 23 · Q2(a)

Question 2(a) 2024 · October-November · Paper 23 · 5 marks

Original past-paper question for 2(A)
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)

Question 5

✓
Total 0
✓
FOR Count 1 TO 100
✓
OUTPUT "Input an integer value"
✓
INPUT NextNumber
✓
IF NextNumber > 0 THEN
✓
Total Total + NextNumber
✓
ENDIF
✓
NEXT Count
✓
OUTPUT Total
✓
Mark as follows:
✓
MP1 Declarations of all variables used
✓
MP2 Loop for 100 iterations
✓
MP3 Prompt and input a value in a loop and
✓
MP4 Test for value > 0 // >=1 in a loop
✓
MP5 Sum the Total in a loop
✓
MP6 Output of Total after the loop

Mark scheme 9618_w24_ms_23.pdf →

Show text version of question

Question 2

Part (a)

Question 2

An algorithm will:

1. prompt and input a sequence of 100 integer values, one at a time 2. sum the positive integers 3. output the result of the sum.

Part (a)

Write pseudocode for the algorithm.

Assume the value zero is neither positive nor negative.

You must declare all variables used in the algorithm.

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

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

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

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

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

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

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

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

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

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

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

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

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

[5]
Topic relevance

Why this question appears here

71% assigned-topic match · Algorithm design and problem-solving › Algorithms

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 9618_w24_qp_23.pdf

Keep practising this topic