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
Practise AQA GCSE Computer Science Relational operations in a programming language with exam-style questions for GCSE Computer Science. 11 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.