An algorithm for monitoring pressure readings from a chemical reactor is shown below.
1 limit ← 350.0
2 pressure_log ← [310.2, 345.5, 352.1, 348.9, 330.0]
3 isOverpressure ← false
4 k ← 0
5 WHILE k < 5 AND isOverpressure = false
6 IF pressure_log[k] > limit THEN
7 isOverpressure ← true
8 ENDIF
9 k ← k + 1
10 ENDWHILE
Explain why using the identifier isOverpressure is a better choice than using the identifier p.
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.