11Easy
0/1

An algorithm is represented using pseudo-code in Figure 1.

Figure 1

1      temp ← USERINPUT
2      target ← temp - 5
3      IF target < 10 OR target > 30 THEN
4          OUTPUT "Alert"
5      ELSEIF target >= 15 AND target <= 25 THEN
6          OUTPUT "Normal"
7      ELSE
8          OUTPUT "Standby"
9      ENDIF

Where is a logical operator first used in the algorithm in Figure 1?

Line number 2

Line number 3

Line number 5

Line number 6

Boolean operations in a programming language Questions

Practise AQA GCSE Computer Science Boolean operations in a programming language with exam-style questions for GCSE Computer Science. 19 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Boolean operations in a programming language Questions

  1. GCSE
  2. /Computer Science
  3. /Boolean operations in a programming language