Skip to content

Course home

Constructs

Constructs

EasyMedium
1234567891011121314
Question 9

An algorithm is shown below:

1 SET readings TO [12, 15, 14, 18, 20, 22, 19, 17]
2 SET filtered TO []
3
4 FOR index FROM 0 TO (LENGTH (readings) - 1) STEP 2 DO
5     APPEND readings[index] TO filtered
6 END FOR

Describe what happens to the variable index when line 4 is executed.

[2]
Markscheme

Constructs Questions

  1. IGCSE
  2. /Computer Science
  3. /Constructs

18 exam-style questions on Edexcel IGCSE Computer Science Constructs. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank