An algorithm is designed to control a smart home heating system.
Below is the pseudocode for this system:
1 temp ← GET_ROOM_TEMP()
2 mode ← 'idle'
3 IF temp < 18 THEN
4 mode ← 'heating'
5 ENDIF
6 WHILE mode = 'heating'
7 IF temp < 15 THEN
8 BOOST_BOILER()
9 ELSE
10 RUN_NORMAL()
11 ENDIF
12 temp ← GET_ROOM_TEMP()
13 ENDWHILE
Which line number shows where iteration is first used in this algorithm?
Line 3
Line 6
Line 7
Line 12
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.