An automated system monitoring critical server performance runs the algorithm shown in Figure 1.
Figure 1
1 priority ← USERINPUT
2 IF priority = 'high' THEN
3 passes ← 3
4 limit ← 5
5 ELSE IF priority = 'standard' THEN
6 passes ← 2
7 limit ← 4
8 ELSE
9 passes ← 1
10 limit ← 2
11 ENDIF
12 count ← 0
13 FOR i ← 1 TO passes
14 j ← 1
15 WHILE j ≤ i DO
16 IF count < limit THEN
17 SEND_ALERT()
18 count ← count + 3
19 ENDIF
20 j ← j + 1
21 ENDWHILE
22 ENDFOR
How many times would the subroutine SEND_ALERT be called if the user input is 'high'?
222
333
555
666
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.