Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
Question 96

Select one option which shows how many times the subroutine BOOT_SERVER would be called if the user input is 'medium' in Figure 1.

Figure 1

1      traffic_level ← USERINPUT
2      IF traffic_level = 'high' THEN
3          servers ← 5
4      ELSE IF traffic_level = 'medium' THEN
5          servers ← 3
6      ELSE
7          servers ← 1
8      ENDIF
9      FOR index ← 1 TO servers + 2
10         IF index MOD 3 = 0 THEN
11             OUTPUT 'skipping'
12         ELSE
13             BOOT_SERVER('node')
14         ENDIF
15     ENDFOR
A

222

B

333

C

555

D

444

Markscheme

Programming concepts Questions

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

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.

Question bank