Quelpr

CAPE Computer Science Unit 1 · 2009 · Paper 2 · Question 4(b)

Trace through the execution of the given algorithm and draw the exact output produced, using '-' to represent spaces printed by printSpaces(n).

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 4(a)Discuss what the 'Identifying and evaluating possible solutions' stage of problem solving would involve for BuyLo.[6 marks]
  2. 4(c)Write an algorithm that uses repetition to find the sum of all multiples of 7 between 14 (inclusive) and 126 (inclusive).[8 marks]

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