These eleven questions cover the stage chain, feedback, decision rules and data quality from automation and emerging systems. They go from easy to harder. Use the pseudocode trace trainer or the Python sandbox to rerun any rule you want to test.
Write your answer first. Then open the worked solution and compare each step, not just the final line.
Questions
Q1 (easy). An automatic door opens when an infrared sensor detects a person. Name the input device, the output device and what the processor does.
Show answer
Input device: the infrared sensor. Output device: the motor that opens the door (the actuator). The processor receives the sensor reading, decides whether a person is detected, and sends a signal to the motor to open.
Q2 (easy). A temperature sensor produces a varying analogue signal. Which component must change it before the processor can use it, and why?
Show answer
An analogue-to-digital converter (ADC). The processor works with digital values, so the converter turns the signal into numbers the processor can compare.
Q3 (easy). Trace this rule for the readings 28, 31, 30, 35, 29.
FOR cycle ← 1 TO 5
temp ← GetReading()
IF temp > 30
THEN
fan ← "ON"
ELSE
fan ← "OFF"
ENDIF
OUTPUT cycle, temp, fan
NEXT cycle
Show answer
| cycle | temp | temp > 30 | fan |
|---|---|---|---|
| 1 | 28 | false | OFF |
| 2 | 31 | true | ON |
| 3 | 30 | false | OFF |
| 4 | 35 | true | ON |
| 5 | 29 | false | OFF |
The reading 30 is not greater than 30, so the fan is OFF in cycle 3.
Q4 (easy). Classify each system as feedback or fixed sequence: (a) a sprinkler that runs for 20 minutes at 06:00 every day, (b) a water pump that stops when a level sensor reads full, (c) a cooker that switches its element off when the sensed temperature reaches the set value.
Show answer
(a) Fixed sequence: it follows a timetable and ignores conditions. (b) Feedback: the pump changes the level and the sensor reads the new level. (c) Feedback: the element changes the temperature and the sensor reads it again.
Q5 (medium). A room starts at 17 °C with a target of 20 °C. Rule: if temp < 20 the heater is ON, otherwise OFF. ON adds 2 °C per step, OFF subtracts 1 °C per step. Trace 5 steps and give the final temperature.
Show answer
| step | temp read | heater | temp after |
|---|---|---|---|
| 1 | 17 | ON | 19 |
| 2 | 19 | ON | 21 |
| 3 | 21 | OFF | 20 |
| 4 | 20 | OFF | 19 |
| 5 | 19 | ON | 21 |
Final temperature: 21 °C. At step 4, 20 < 20 is false, so the heater is OFF.
Q6 (medium). An irrigation rule is IF moisture < 40 AND rainExpected = "no" THEN pump ← "ON" ELSE pump ← "OFF". Give the pump state for (a) moisture 39, rain “no”; (b) moisture 40, rain “no”; (c) moisture 20, rain “yes”.
Show answer
(a) 39 < 40 is true and rain is “no”: ON. (b) 40 < 40 is false: OFF. (c) 20 < 40 is true but rain is “yes”, so the AND is false: OFF.
Q7 (medium). Python version of a counting rule. What is printed?
temps = [22, 25, 31, 27]
count = 0
for t in temps:
if t >= 25:
count = count + 1
print(count)
Show answer
22 is not >= 25, so no change. 25, 31 and 27 each satisfy the test, so count goes 1, 2, 3. It prints 3.
Q8 (medium). An alarm triggers on a reading above 55. The readings are 45, 52, 61, 58, 49. The loop adds 1 to alarms each time the rule is true, starting at 0. What is alarms at the end?
alarms ← 0
FOR i ← 1 TO 5
value ← GetReading()
IF value > 55
THEN
alarms ← alarms + 1
ENDIF
NEXT i
Show answer
45 false, 52 false, 61 true (alarms = 1), 58 true (alarms = 2), 49 false. Final value: 2.
Q9 (harder). A sensor sends 12, 14, -999, 13, 15, where -999 means “no reading”. Valid range is 0 to 50. (a) What is the average of the accepted readings? (b) What would the average be if -999 were included?
Show answer
(a) Accepted: 12, 14, 13, 15. Total = 54, count = 4, average = 54 ÷ 4 = 13.5. (b) Total = 54 + (-999) = -945, count = 5, average = -945 ÷ 5 = -189, which is impossible for the setting.
Q10 (harder). A watering controller was set up using only readings taken on sunny afternoons. Explain why it may make poor decisions on a cool, cloudy morning, and suggest one improvement.
Show answer
Its stored values describe only one kind of condition, so its rule may treat normal cool-morning readings as unusual, for example by switching the pump on when it is not needed. This is a data problem, not a fault in the processor. Improvement: check the rule against readings from different times and weather, and adjust the thresholds.
Q11 (harder). A student keeps these notes before a Computer Science exam in 2027. Give each a status (verified, needs checking, or later year only). (a) A definition copied from the Cambridge 0478 syllabus for 2026 to 2028. (b) A claim from a video with no stated year. (c) A note taken from the Cambridge 0265 page about later years.
Show answer
(a) Verified: it comes from the syllabus covering the exam year. (b) Needs checking: the year is unknown, so check it against the syllabus for the exam year. (c) Later year only: it belongs to a different document, so keep it labelled and apart from revision for 2027 unless the student’s own syllabus includes it.
If you got these wrong
- Q1, Q2, Q3 wrong: you are mixing up the stages or comparison symbols. Revisit tracing sensor, processor and actuator stages.
- Q4, Q5 wrong: the feedback test or the carry-over between steps slipped. Revisit feedback and fixed sequences.
- Q6, Q7, Q8 wrong: check AND against OR, and boundary values. Revisit explaining a simple decision model.
- Q9, Q10 wrong: you trusted a bad reading, or did not name the data problem. Revisit assessing data quality.
- Q11 wrong: revisit labelling 2029-only additions.
Record each wrong answer in the mistake log and retest queue, with the error type, and retest a similar question in a few days.
If the same error keeps coming back, Computer Science tuition with an assigned teacher can work on that pattern directly.