Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 39
Easy

State the most suitable data type for the following variables used in the algorithm below.

Algorithm

depthReading ← USERINPUT
baselineTemp ← USERINPUT
temperatureAnomaly ← 0.0
locationTag ← "North Rift Zone"
warningMessage ← "ALERT: Critical fluctuation detected"

IF depthReading > 2500 THEN
    IF baselineTemp >= 350.5 THEN
        temperatureAnomaly ← 14.82
        OUTPUT warningMessage
    ELSE
        temperatureAnomaly ← (depthReading / baselineTemp) * 1.5
        OUTPUT temperatureAnomaly
    ENDIF
ELSE
    OUTPUT locationTag
ENDIF
a.

temperatureAnomaly

[1]
b.

locationTag

[1]

Data types Questions

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