An automated climate control system uses codes to identify different heating zones in a smart building. The code for each zone type is shown in the table:
| Zone Code | Zone Name |
|---|---|
| HW | Hallway |
| KT | Kitchen |
| BD | Bedroom |
A program is written to process temperature adjustments. The program:
IsActiveZone() to check whether the entered zone is currently active and configurable01 zoneCode = input("Enter the heating zone code")
02 if IsActiveZone(zoneCode) then
03 targetTemp = input("Enter the target temperature in Celsius")
04 print("Setting zone " + zoneCode + " to " + targetTemp + " degrees.")
05 endif
Identify the data type of the value returned by the function IsActiveZone().
Practise OCR GCSE Computer Science Data types with exam-style questions for GCSE Computer Science. 26 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.