May/June 2026 Paper 23

2026 · 8 questions · 27 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong27Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
2(a)Data Types Variables Input OutputEasy1 mark
A control program is being developed for a robot floor vacuum cleaner. The settings for the robot can be changed and include the strength of the suction (numerical values: 0, 1, 2, 3, 4 or 5) and the total vacuum cleaning time (a whole number of minutes).
The robot has a number of sensors. The control program includes the variables:
VariableDescription
MainsOnTRUE when the mains power is on
DisplayOnTRUE when the user display is shown
SuctionTRUE when the program detects that the user has selected a non-zero value for the strength of the suction
Identify the data type used for the three variables.
2(b)Operators Expressions SelectionEasy1 mark
Write a pseudocode statement to set the DisplayOn variable to TRUE when the mains power is on.

Answer

0 words
2(c)Operators Expressions SelectionMedium2 marks
When the robot is ready to move, the program assigns the value TRUE to a variable, Move. The control program contains the pseudocode logic expression:
pseudocode
Move ← MainsOn AND Suction
Explain the pseudocode statement.

Answer

0 words
2(d)(i)Testing DebuggingEasy1 mark
The pseudocode for the control program contains the procedure CleanProgram()
pseudocode
PROCEDURE CleanProgram()// declaration of variables has been omittedFinished ← FALSEOUTPUT "Total clean time (minutes)"INPUT  TotalCleanTimeOUTPUT "Suction strength (0,1,2,3,4,5)"INPUT  SuctionStrengthWHILE Finished = FALSE   // TimeSoFar is a global variable which changes   // as the procedure is executed   // TimeSoFar is the time the robot has been cleaning (in seconds)   TimeRemaining ← TotalCleanTime - INT(TimeSoFar/60)ENDWHILEENDPROCEDURE
When the program is under development and running, the programmer can temporarily stop the execution at a set point in the program. Identify this feature of the Integrated Development Environment (IDE).
2(d)(ii)Data Types Variables Input OutputEasy1 mark
The programmer runs the program. The user is prompted and inputs the value 40 (total clean time in minutes). The user is prompted and inputs the value 3 (for the suction strength). The programmer interrupts its execution; the TimeSoFar is shown in a report window as 125 (the cleaning time so far in seconds). State the current value of TimeRemaining

Answer