Fig. 1 shows a program decision for an aquarium monitoring system. A probe stores the water pH in pH. The system should send a message when the pH is outsid...

Assessment: Computer Science 9210 | Paper 1 Mock 01 | Programming (on-screen) Subject: Computer Science - 9210

Question 1 Report

Fig. 1 shows a program decision for an aquarium monitoring system. A probe stores the water pH in pH. The system should send a message when the pH is outside the safe range 6.8 to 7.4 inclusive. The diagram shows the first test currently used.

Read pH valuepH < 6.8?YesSend messageNoNext test© EAGLE BEACON GLOBAL

(a) Explain the result of the displayed test when pH is 6.8. [1]
(b) When pH is 6.7, state the command selected by Fig. 1. [1]
(c) When the second test checks for water above the safe range, write that condition. [1]
(d) Explain why the two tests need to be joined with OR, rather than AND, to make one alarm condition. [1]

Answer Details

(a) When pH is 6.8, pH < 6.8 is false because 6.8 is not less than itself. The lower safe boundary is included. [1]

(b) When pH is 6.7, the test is true, so the selected command is Send message. [1]

(c) The condition for water above the safe range is pH > 7.4. [1]

(d) The alarm is needed if the pH is too low or too high. A value cannot normally be below 6.8 and above 7.4 at the same time, so using AND would prevent either single unsafe condition from raising the alarm. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning