Skip to content

Course home

Boolean operations in a programming language

Boolean operations in a programming language

EasyMedium
123456789101112131415161718
Question 16

An algorithm is represented using pseudo-code below:

1  systolic ← USERINPUT
2  diastolic ← USERINPUT
3  IF systolic >= 140 THEN
4      high_pressure ← TRUE
5  ENDIF
6  IF high_pressure AND diastolic >= 90 THEN
7      OUTPUT "Hypertension Alert"
8  ELSEIF diastolic < 60 OR systolic < 90 THEN
9      OUTPUT "Hypotension Alert"
10 ENDIF

Where is a logical operator first used in this algorithm?

A

Line 3\text{Line 3}Line 3

B

Line 4\text{Line 4}Line 4

C

Line 6\text{Line 6}Line 6

D

Line 8\text{Line 8}Line 8

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