Skip to content

Course home

Relational operations in a programming language

Relational operations in a programming language

Easy
1234567891011
Question 1

An algorithm designed to monitor a temperature sensor is shown below.

1      temp_celsius ← 24.5
2      threshold ← USERINPUT
3      critical_limit ← threshold * 1.5 - 2.0
4      is_active ← TRUE
5      IF temp_celsius >= critical_limit AND is_active THEN
6          OUTPUT "Warning"
7      ELSEIF critical_limit != 0.0 OR temp_celsius == 0.0 THEN
8          OUTPUT "System check"
9      ENDIF

On which line is a relational operator first used?

A

Line 3

B

Line 4

C

Line 5

D

Line 7

Markscheme

Relational operations in a programming language Questions

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

11 exam-style questions on AQA GCSE Computer Science Relational operations in a programming language. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank