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
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.