Skip to content

Course home

Boolean operations in a programming language

Boolean operations in a programming language

EasyMedium
123456789101112131415161718
Question 10

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?

A

Line number 2

B

Line number 3

C

Line number 5

D

Line number 6

Markscheme

Boolean operations in a programming language Questions

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

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.

Question bank