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.
95 exam-style questions on OCR GCSE Computer Science Programming fundamentals. Each one has a worked solution and a mark scheme showing where the marks go.