User interface language: English | Español

Date November 2021 Marks available 3 Reference code 21N.1.SL.TZ0.8
Level SL Paper 1 Time zone no time zone
Command term Construct Question number 8 Adapted from N/A

Question

Construct a trace table for the following algorithm:

I = 0
loop while 6 > I
K = K + I
I = I + 2
end loop
output(K)

Markscheme

Award [3 max] 

Award [1] for correct values in column I
Award [1] for correct values in column K
Award [1] for correct output
Note: Column 6 > I may not appear in the trace table.

Examiners report

Candidates were generally able construct a trace table for a given algorithm. They were also able to demonstrate the completion of this table. The main error seen was that the algorithm stops once the value of I reaches 6, but many candidates continued their trace table for at least one more iteration after that.

View options