The alarm system can also have many sensors - OCR - GCSE Computer Science - Question 6 - 2023 - Paper 2
Question 6
The alarm system can also have many sensors. Each type of sensor has a code. The code for each sensor is from the list below:
| Code | Sensor |
|------|------... show full transcript
Worked Solution & Example Answer:The alarm system can also have many sensors - OCR - GCSE Computer Science - Question 6 - 2023 - Paper 2
Step 1
Give the code number of the variable used in the program.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The code number of the variable used in the program is SensorType.
Step 2
Identify the data type of the variable used.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The data type of the variable SensorType is a String.
Step 3
Give the line number that contains a function call.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The line number that contains a function call is Line 4.
Step 4
Identify two programming constructs that have been used in the program.
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The two programming constructs used in the program are: