A smart lighting controller uses the following algorithm to adjust brightness levels based on the room mode entered by a user:
1 mode ← USERINPUT
2 IF mode = 'sleep' THEN
3 brightness ← 10
4 ELSE IF mode = 'reading' THEN
5 brightness ← 80
6 ELSE IF mode = 'party' THEN
7 color ← 'purple'
8 ELSE
9 OUTPUT 'mode not supported'
10 ENDIF
11 FOR count ← 1 TO brightness
12 IF count < 50 THEN
13 FADE_LED('warm_white')
14 ELSE
15 FADE_LED('cool_white')
16 ENDIF
17 ENDFOR
State how many possible values the result of the comparison mode = 'reading' could have.
19 exam-style questions on AQA GCSE Computer Science Boolean operations in a programming language. Each one has a worked solution and a mark scheme showing where the marks go.