Question Constellation Sign up for free
Q02.2 1 mark

AQA · GCSE · Computer Science · Higher · Paper 1A Computational thinking and programming skills (C#)

Figure 2 shows an algorithm, represented using pseudo-code. Line numbers are included but are not part of the algorithm.

Figure 2
1num ← USERINPUT
2IF NOT(num > 1) OR num > 20 THEN
3 OUTPUT "False"
4ELSEIF num > 1 AND num < 15 THEN
5 OUTPUT "Almost"
6ELSEIF num MOD 5 = 0 THEN
7 OUTPUT "True"
8ELSE
9 OUTPUT "Unknown"
10ENDIF

In the algorithm in Figure 2, what will be the output when the user input is 5? Shade one lozenge.

Your answer