Skip to content
IGCSE·Tuition
Computer Science · Practice

Automation and emerging systems: mixed practice with explanations

Practice only helps when you write your trace first and check your working against a full explanation afterwards.

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
cycletemptemp > 30fan
128falseOFF
231trueON
330falseOFF
435trueON
529falseOFF

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
steptemp readheatertemp after
117ON19
219ON21
321OFF20
420OFF19
519ON21

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

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.

Questions people ask

How should I use this practice set?

Work on paper, write each trace table before opening the answer, and compare your working line by line. Mark which lesson each wrong answer belongs to, then retry a similar question a few days later. Open the answer only after you have committed to your own.

Are these questions copied from past papers?

No. Every question here is original and written to practise the skills in the module. Use your syllabus year and the Cambridge page to see how your own papers are set out, and ask your centre which past papers you may use.

What if my pseudocode notation looks different from yours?

Cambridge sets out the pseudocode conventions for each syllabus year. Check the document for your year and follow it in your answers. The logic of each trace stays the same even if a keyword is written slightly differently.

Sources

  1. Cambridge IGCSE Computer Science 0478 subject page

Updated:

Your next step

If the same kind of question keeps going wrong, a one-to-one teacher can look at your written traces and find the step where your reasoning changes direction.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service