Skip to content
MathsGenie logo
Open app

Course home

  1. GCSE
  2. Computer Science Edexcel
  3. Question bank

Computational thinking

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
Question 34

An algorithm designed to monitor the safety status of a chemical reactor based on its core temperature is shown below.

1 SET reactorTemp TO 112.4
2
3 IF (reactorTemp >= 150.0) THEN
4     SEND "Critical" TO DISPLAY
5 END IF
6 IF (reactorTemp >= 100.0) AND (reactorTemp < 150.0) THEN
7     SEND "High" TO DISPLAY
8 END IF
9 IF (reactorTemp >= 50.0) AND (reactorTemp < 100.0) THEN
10    SEND "Normal" TO DISPLAY
11 END IF
12 IF (reactorTemp < 50.0) THEN
13    SEND "Low" TO DISPLAY
14 END IF

The programmer notes that using consecutive, independent selection statements makes this algorithm highly inefficient.

Explain how the structure and conditions of this algorithm should be modified to resolve these inefficiencies.

[3]

Computational thinking Questions

  1. GCSE
  2. /Computer Science
  3. /Computational thinking