Refer to the algorithm in Figure 1.
1 attempts ← 0
2 success ← False
3 WHILE success = False AND attempts < 3
4 password ← USERINPUT
5 IF password = "secret" THEN
6 success ← True
7 FOR i ← 1 TO 5
8 OUTPUT "Access Granted"
9 ENDFOR
10 ELSE
11 attempts ← attempts + 1
12 ENDIF
13 ENDWHILE
Where is iteration first used in the algorithm in Figure 1?
Line number 3
Line number 5
Line number 7
Line number 11
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.