Complete the trace table for the algorithm shown in Figure 1 when the initial value of rate is 2.
Figure 1
population ← 10
FOR hour ← 1 TO 3
population ← (population * rate) - 4
ENDFOR
You may not need to use all rows of the trace table.
| rate | hour | population |
|---|---|---|
| 2 | 10 | |
208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.