Quelpr

CAPE Computer Science Unit 1 · 2015 · Paper 2 · Question 3(b)(iv)

Two algorithms showing different iterative structures.

Explain how the loop in Algorithm 2 is expected to terminate.

This question uses a figure or table from the paper — you'll see it when you practise.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 3(a)Explain what takes place during the 'implementation and review' stage of problem-solving.[4 marks]
  2. 3(b)(i)Identify which of the two algorithms illustrates unbounded iteration.[1 mark]
  3. 3(b)(ii)Identify which of the two algorithms illustrates bounded iteration.[1 mark]
  4. 3(b)(iii)Explain how the loop in Algorithm 1 is expected to terminate.[2 marks]
  5. 3(c)Identify and correct FOUR errors in the algorithm by referencing their specific line numbers.[8 marks]
  6. 3(d)Write an algorithm using iteration to calculate the sum of all multiples of 8 and all multiples of 11 between m (inclusive) and n (exclusive), where m and n…[7 marks]

More practice: the rest of this paper · more Algorithm Design and Representation questions · all CAPE Computer Science Unit 1 past papers