An algorithm is designed to control a smart garden sprinkler system based on the current season.
1 season ← USERINPUT
2 IF season = 'summer' THEN
3 cycles ← 3
4 ELSE IF season = 'spring' OR season = 'autumn' THEN
5 cycles ← 2
6 ELSE IF season = 'winter' THEN
7 cycles ← 0
8 ELSE
9 OUTPUT 'Season not recognised'
10 ENDIF
11 FOR i ← 1 TO cycles
12 IF i < 3 THEN
13 ACTIVATE_SPRINKLER('mist')
14 ELSE
15 ACTIVATE_SPRINKLER('heavy')
16 ENDIF
17 ENDFOR
Which option shows the data type of the variable season in this algorithm?
Real
String
Integer
Boolean
50 exam-style questions on AQA GCSE Computer Science Data types. Each one has a worked solution and a mark scheme showing where the marks go.