Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 30
Easy

State the most suitable data type for the variables waterTemperature and systemLog used in the algorithm below.

stationID ← USERINPUT
waterTemperature ← 18.5
systemLog ← "Normal operation"
criticalAlert ← "CRITICAL TEMPERATURE WARNING"

waterTemperature ← USERINPUT
IF waterTemperature > 30.0 THEN
    systemLog ← criticalAlert
    OUTPUT systemLog
ELSE
    IF waterTemperature < 5.0 THEN
        systemLog ← "Low temperature warning"
        OUTPUT systemLog
    ELSE
        OUTPUT systemLog
    ENDIF
ENDIF
Variable identifierData type
waterTemperature
systemLog
[2]

Data types Questions

  1. GCSE
  2. /Computer Science
  3. /Data types