Learn Extracted exam questions IGCSE Computer Science 0478 Computer Science November 2025 Question Paper 23
0478 Computer Science November 2025 Question Paper 23
Source PDF on the left, extracted YAML on the right. Compare numbering, marks, options and text.
Give \textbf{three} ways of creating a maintainable program.
- \hrulefill
- \hrulefill
- \hrulefill
\textbf{Four} descriptions of programming techniques and \textbf{five} programming techniques are given.
Draw \textbf{one} line from each description to the relevant technique. \textbf{Not} all techniques will be used.
\begin{tabular}{p{7cm}p{5cm}} \textbf{Description} & \textbf{Programming technique} \ & \ adding up a set of numbers & output \ & \ displaying the result of a calculation & selection \ & \ executing a set of instructions based on a condition & totalling \ & \ executing the same set of instructions multiple times & iteration \ & \ & counting \ \end{tabular}
Tick ($\checkmark$) \textbf{one} box to identify the most appropriate data type to store \texttt{'M'}
Tickets for a theme park are booked online. An adult ticket costs $12.99 and a child ticket costs$7.99. A booking fee of $1.99 is added to the total cost of each booking.
Write an algorithm in pseudocode to:
\begin{itemize} \item input the number of adult tickets for a booking \item input the number of child tickets for a booking \item calculate and output the total cost of the booking using an appropriate message. \end{itemize}
Each booking must have at least one adult ticket.
Explain how the algorithm could be changed to repeatedly ask for the number of adult tickets if the number input is less than 1.
Any code used must be fully explained.
The theme park has rules for a person to be able to go on a ride.
A person can go on a ride ($X = 1$) only if they: \begin{itemize} \item are 1.4 metres tall or over \item are 12 years old or over \item do not have a medical condition. \end{itemize}
\begin{tabular}{|c|l|c|} \hline \textbf{Input} & \textbf{Description} & \textbf{Binary value} \ \hline \textbf{A} & under 1.4 metres & 0 \ \cline{2-3} & 1.4 metres or over & 1 \ \hline \textbf{B} & under 12 years old & 0 \ \cline{2-3} & 12 years old or over & 1 \ \hline \textbf{C} & does \textbf{not} have a medical condition & 0 \ \cline{2-3} & has a medical condition & 1 \ \hline \end{tabular}
Write the logic expression for this problem.
$X =$ \hrulefill
Complete the truth table for this problem.
\begin{tabular}{|c|c|c|c|c|} \hline \textbf{A} & \textbf{B} & \textbf{C} & \textbf{Working space} & \textbf{X} \ \hline 0 & 0 & 0 & & \ \hline 0 & 0 & 1 & & \ \hline 0 & 1 & 0 & & \ \hline 0 & 1 & 1 & & \ \hline 1 & 0 & 0 & & \ \hline 1 & 0 & 1 & & \ \hline 1 & 1 & 0 & & \ \hline 1 & 1 & 1 & & \ \hline \end{tabular}
A program has been written in pseudocode to input five numbers between 1 and 900 inclusive and store the highest number and the lowest number entered.
\begin{alltt} 01 Lowest <- 900 02 Highest <- 1 03 FOR Count <- 1 TO 5 04 INPUT Number 05 IF Number < Lowest 06 THEN 07 Lowest <- Number 08 ELSE 09 IF Number > Highest 10 THEN 11 Highest <- Number 12 ENDIF 13 ENDIF 14 NEXT Count \end{alltt}
Complete the trace table for the algorithm using the following numbers:
563, 21, 376, 99, 400
\begin{tabular}{|c|c|c|c|} \hline \textbf{Count} & \textbf{Number} & \textbf{Lowest} & \textbf{Highest} \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline \end{tabular}
The algorithm does \textbf{not} work correctly.
State the reason why the algorithm does \textbf{not} work as expected and explain how the algorithm could be corrected.
Any code used must be fully explained.
Reason \hrulefill
Correction \hrulefill
The algorithm uses the one-dimensional (1D) array \texttt{ClassList} that contains the following data:
\textbf{ClassList}
\begin{tabular}{|c|c|c|c|c|} \hline \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} \ \hline Henil & Sven & Ella & Asia & Ridwan \ \hline \end{tabular}
\newline\newline Complete the table by writing the output from the flowchart when each of the given names are input.
\begin{tabular}{|c|c|} \hline \textbf{Name} & \textbf{OUTPUT} \ \hline Ridwan & \hrulefill \ \hline Yan & \hrulefill \ \hline Ella & \hrulefill \ \hline \end{tabular}
Identify the standard method of solution used by the flowchart.
Write the algorithm in pseudocode.
An algorithm has been written in pseudocode to:
\begin{itemize} \item input a whole number between 1 and 255 inclusive \item convert the input to an 8-bit binary number \item store each bit of the binary number in an array. \end{itemize}
For example, if the denary number 127 was input, the binary number 01111111 would be stored in the array.
\begin{alltt} 01 DECLARE BinaryArray : ARRAY[1:8] OF INTEGER 02 DECLARE DenaryNumber : CHAR 03 OUTPUT "Please enter a whole number between 1 and 255 inclusive " 04 INPUT DenaryNumber 05 FOR Count <- 7 TO 1 STEP -1 06 BinaryArray[Count] <- MOD(DenaryNumber,3) 07 DenaryNumber <- DIV(DenaryNumber,2) 08 NEXT Count \end{alltt}
Identify the line numbers of the \textbf{three} errors in the pseudocode and suggest a correction for each error.
Error 1 line number \hrulefill
Correction \hrulefill
Error 2 line number \hrulefill
Correction \hrulefill
Error 3 line number \hrulefill
Correction \hrulefill
Identify \textbf{one} programming technique used in the algorithm.
The algorithm can accept a number between 1 and 255 inclusive as input. Two validation checks that could be applied to \texttt{DenaryNumber} are a presence check and a type check.
Identify \textbf{one} other validation check that could be applied to \texttt{DenaryNumber}
Write the pseudocode to implement the validation check you identified in (c)(i).
You do \textbf{not} need to rewrite the whole algorithm.
A school has set up a database table \texttt{EquipmentLoan} to record details of school equipment loaned to students.
\begin{tabular}{|l|l|l|l|l|} \hline \textbf{EquipmentID} & \textbf{Description} & \textbf{Name} & \textbf{DateLoaned} & \textbf{Returned} \ \hline Cam01 & Digital camera & James & 23/04/2025 & No \ \hline Cam04 & Digital camera & Amir & 12/03/2025 & Yes \ \hline Gra02 & Graphics tablet & Nikita & 27/04/2025 & No \ \hline Tab01 & Tablet & Holly & 18/03/2025 & Yes \ \hline Ext01 & External Hard drive & Hussein & 27/04/2025 & Yes \ \hline Cam02 & Digital camera & Emily & 10/04/2025 & Yes \ \hline Tri01 & Tripod & Emily & 10/04/2025 & Yes \ \hline \end{tabular}
Give the name of the field that is most appropriate to be the primary key.
State the reason for choosing this field for the primary key.
Complete the structured query language (SQL) statement to list equipment \textbf{not} returned. The list must contain only the descriptions and student names.
\begin{alltt} SELECT \hrulefill FROM \hrulefill WHERE \hrulefill ; \end{alltt}
The variables \texttt{Name}, \texttt{Age} and \texttt{Found} are used in a computer program. \texttt{Name} holds the name of a person. \texttt{Age} holds the age of a person as a whole number. \texttt{Found} holds a flag that can be set to \texttt{TRUE} or \texttt{FALSE}
Write pseudocode statements to declare the variables \texttt{Name}, \texttt{Age} and \texttt{Found}
The procedure \texttt{StoreData(Name)} stores the name of a person in the file \texttt{People.txt}
Write pseudocode statements to:
\begin{itemize} \item define the procedure with the parameter \item store the name of the person in the file. \end{itemize}
Write the pseudocode that uses the procedure \texttt{StoreData()} to store the name ‘Suella’ in the file \texttt{People.txt}
A number game has two players. Random whole numbers are generated for each player. The numbers are compared and players are given points based on the result of the comparison.
The two-dimensional (2D) array \texttt{NumberGenerated[]} stores each number generated for each player. The first dimension stores the player number and the second dimension stores the random whole numbers generated.
The game is played as follows:
\begin{itemize} \item 100 random whole numbers between 1 and 6 inclusive are generated for player 1 and stored in the array. \item 100 random whole numbers between 1 and 6 inclusive are generated for player 2 and stored in the array. \item The first number generated for each player is compared and the player with the higher number is awarded 2 points. If the two numbers are the same, both players are awarded 1 point each. \item The comparisons repeat for all 100 numbers generated. \item The player with the higher total number of points is output as the winner. \item If the players have the same total number of points, a new random whole number is generated for each player and compared. This is repeated until one player has a higher number than the other player. 2 points are added to that player's total number of points, making this player the winner. \end{itemize}
Write a program that meets the following requirements:
\begin{itemize} \item input and validate the names of the two players \item generate 100 random whole numbers between 1 and 6 inclusive for each player and store them in the array \texttt{NumberGenerated[]} \item calculate and store the total number of points for each player \item output the name and total number of points for each player in descending order of total number of points. \end{itemize}
You must use pseudocode or program code \textbf{and} add comments to explain how your code works.
You do not need to declare any arrays or variables; assume that this has already been done.
All outputs must contain suitable messages.