An automated brewing vessel uses the following algorithm to adjust temperature and valve settings based on the system status entered by an operator:
1 status ← USERINPUT
2 IF status = 'boil' THEN
3 target_temp ← 100
4 ELSE IF status = 'mash' THEN
5 target_temp ← 65
6 ELSE IF status = 'ferment' THEN
7 glycol_valve ← 'open'
8 ELSE
9 OUTPUT 'status invalid'
10 ENDIF
11 FOR step ← 1 TO target_temp
12 IF step < 70 THEN
13 ENGAGE_HEATER('low_power')
14 ELSE
15 ENGAGE_HEATER('high_power')
16 ENDIF
17 ENDFOR
State how many possible values the result of the comparison status = 'ferment' can 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.