3Easy
0/1

Select one option which shows the line number where iteration is first used in the algorithm shown in Figure 1.

Figure 1

1      category ← USERINPUT
2      IF category = 'high' THEN
3          limit ← 10
4      ELSE IF category = 'medium' THEN
5          limit ← 5
6      ELSE IF category = 'low' THEN
7          limit ← 2
8      ELSE
9          limit ← 0
10     ENDIF
11     OUTPUT 'Setting initialized'
12     FOR i ← 1 TO limit
13         IF i MOD 2 = 0 THEN
14             FLASH_LED('blue')
15         ELSE
16             FLASH_LED('red')
17         ENDIF
18     ENDFOR

Line number 2

Line number 11

Line number 12

Line number 13

Programming concepts Questions

Practise AQA GCSE Computer Science Programming concepts with exam-style questions for GCSE Computer Science. 100 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts