An automated highway speed monitoring system uses the following algorithm to check if a vehicle is travelling within the permitted range:
1 min_speed ← 30
2 max_speed ← 70
3 measured_speed ← sensor_reading * 3.6
4 IF measured_speed >= min_speed AND measured_speed <= max_speed THEN
5 is_valid ← TRUE
6 ELSE
7 is_valid ← FALSE
8 ENDIF
Select the line number that contains a relational operator.
Line 1
Line 3
Line 4
Line 5
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.