An automated greenhouse irrigation system controls watering zones. Each zone has a specific code, as shown in the table below:
| Code | Zone Type |
|---|---|
| NT | North Tunnel |
| ST | South Tunnel |
| HP | Hydroponics |
A program is written to update irrigation settings. The program:
CheckZoneValid() to check whether the entered code is validQueueCommand()01 print("Irrigation System Controller v2.1")
02 zoneCode = input("Enter zone code: ")
03 isValid = CheckZoneValid(zoneCode)
04 if (isValid == true) then
05 targetMoisture = input("Enter target soil moisture percentage: ")
06 controlCommand = zoneCode + ":" + targetMoisture
07 QueueCommand(controlCommand)
08 endif
Give the line number that contains the call to the prewritten validation function.
Practise OCR GCSE Computer Science Programming fundamentals with exam-style questions for GCSE Computer Science. 100 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 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.