An algorithm designed to calibrate and validate telemetry data from a meteorological sensor is shown below:
1 sensor_reading ← USERINPUT
2 calibration_constant ← 1.45
3 adjusted_value ← sensor_reading * calibration_constant + 0.5
4 status_valid ← TRUE
5 IF adjusted_value != 0.0 AND NOT status_valid THEN
6 OUTPUT "Error"
7 ELSEIF adjusted_value >= 100.0 OR adjusted_value < -10.0 THEN
8 OUTPUT "Out of bounds"
9 ELSE
10 OUTPUT "Normal"
11 ENDIF
On which line is a relational operator first used?
Line 3
Line 5
Line 4
Line 7
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.