Past-paper question · 2015 May-June · Paper 22 · Q2(a)(i)

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

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

Official answer for Question 2

Part (a)

(i)

Part (a)

(i)

✓
x
✓
Result
✓
x < > -1
✓
0
✓
0
✓
TRUE

Question 3

Question 3

✓
TRUE

Question 5

Question 8

✓
TRUE

Question 2

Question 10

✓
TRUE

Question 1

Question 11

✓
TRUE
  • 1

Question 10

✓
FALSE

1 mark per correct column[3]

✓
OUTPUT: 10
[1]

Mark scheme 9691_s15_ms_22.pdf →

Show text version of question

Question 2

Part (a)

(i)

Question 2

The pseudocode below is intended to calculate the sum of a sequence of integers input.

The dummy value −1 ends the input.

DECLARE x : INTEGER DECLARE Result : INTEGER x ← 0 Result ← 0 WHILE x <> -1 INPUT x Result ← Result + x ENDWHILE OUTPUT Result

Question 3

(i)

The sequence of numbers 3, 5, 2, 1 is input and terminated with −1.

Complete the trace table.

x Result x <> -1

0 0

Output ..........................................................................................................................

[4]
Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Programming basics

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 9691_s15_qp_22.pdf

Keep practising this topic