Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

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]

Constructs Questions

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