Try 7 real questions from May/June 2023
These are real past-paper questions. Think of your answer first, then open the explanation.
May/June 2023 · Paper 1 · Hardware and software
A farm has an automated drinking system for its animals. The drinking system has a water bowl that contains the water. When the water bowl is empty, it is automatically refilled. The system uses a sensor and a microprocessor. (a) Identify the most appropriate sensor for this system. (b) Describe how the sensor and the microprocessor are used to automatically refill the water bowl.
Show model answer
(a) A water-level sensor / float switch (or pressure sensor).
(b) The sensor measures the water level in the bowl and sends this data to the microprocessor. When the level falls to empty (below a threshold), the microprocessor sends a signal to open a valve/pump to refill the bowl. When the sensor detects the bowl is full, the microprocessor closes the valve/pump. This repeats as a control loop.
Float/water-level sensor triggers microprocessor to open valve when empty.
May/June 2023 · Paper 1 · Low-Level Languages
A programmer uses a low-level language to write a computer program for a vending machine. (a) Describe what is meant by a low-level language. (b) Give two reasons why the programmer would choose to write the computer program in a low-level language instead of a high-level language.
Show model answer
(a) A low-level language is close to the computer's own machine code (e.g. assembly language or machine code); it uses mnemonics or binary and is specific to a particular processor architecture.
(b) Any two: it executes faster; it uses less memory; it allows direct control of hardware; it does not need a translator at run time / no overhead from an interpreter or compiler.
Low-level = assembly/machine code, processor-specific; faster, smaller, direct hardware.
May/June 2023 · Paper 1 · Hardware and software
A company uses robots in its factory to manufacture large pieces of furniture. (a) One characteristic of a robot is that it is programmable. State two other characteristics of a robot. (b) Give two advantages to company employees of using robots to manufacture large pieces of furniture. (c) Give one disadvantage to the company's owners of using robots to manufacture large pieces of furniture.
Show model answer
(a) Any two: a robot can sense its environment (has sensors); a robot can act on/move its environment (has actuators/motors); a robot can operate automatically/autonomously; a robot can make decisions.
(b) Any two: safer (robots do dangerous/heavy work); less physically tiring; higher productivity; more consistent quality.
(c) Any one: high initial purchase cost; job losses for employees; maintenance/repair costs.
Robots: programmable, sense, actuate, autonomous. Pros: safety/productivity. Cons: cost/jobs.
May/June 2023 · Paper 2 · Data Structures
Tick one box to show the name of the data structure used to store a collection of data of the same data type. A Array B Constant C Function D Variable.
Show model answer
A - Array (an array stores a collection of data items all of the same data type).
Array holds multiple items of the same type.
May/June 2023 · Paper 2 · Programming
Explain the purpose of the library routines DIV and ROUND.
Show model answer
DIV returns the result of integer division (the whole-number quotient with the remainder discarded), e.g. 9 DIV 4 = 2. ROUND returns a number rounded to the nearest whole number (or to a given number of decimal places), e.g. ROUND(3.6) = 4 and ROUND(3.2) = 3.
DIV = integer quotient; ROUND = nearest integer.
May/June 2023 · Paper 2 · Algorithm design and problem solving
State two features that should be included to create a maintainable program. Give a reason why each feature should be used.
Show model answer
Any two, e.g.:
1. Meaningful variable/identifier names - makes the code easier to read and understand so future changes are simpler.
2. Comments - explain what sections of code do, helping programmers maintain/debug it.
(Other valid: indentation for readability; modular structure using procedures/functions.)
Maintainable: meaningful names + comments + indentation + modularity.
May/June 2023 · Paper 2 · Programming
The function LENGTH(Phrase) calculates the length of a string Phrase. (a) Write the pseudocode statements to: store the string "The beginning is the most important part" in Phrase; calculate and output the length of the string; output the string in upper case. (b) Write the output your pseudocode should produce.
Show model answer
(a) Phrase <- "The beginning is the most important part"
OUTPUT LENGTH(Phrase)
OUTPUT UPPER(Phrase)
(b) 40
THE BEGINNING IS THE MOST IMPORTANT PART
Length = 40 characters; upper-case version as shown.