Skip to content

Learn Extracted exam questions IGCSE Computer Science 0478 Computer Science November 2025 Question Paper 21

0478 Computer Science November 2025 Question Paper 21

Source PDF on the left, extracted YAML on the right. Compare numbering, marks, options and text.

1 4 marks short_answer p. 2 9

Four descriptions of structured query language (SQL) keywords and \textbf{five} SQL keywords are given.

Draw \textbf{one} line from each description to its matching keyword. \textbf{Not} all SQL keywords will be used.

\textbf{Description} \begin{itemize} \item identifies the database table \item sets the condition \item sorts the results \item returns the number of records \end{itemize}

\textbf{SQL keywords} \begin{itemize} \item \texttt{ORDER BY} \item \texttt{COUNT} \item \texttt{WHERE} \item \texttt{SUM} \item \texttt{FROM} \end{itemize}

2 3 marks short_answer p. 2 7

Identify \textbf{three} different types of test data that can be used to test a program.

  1. \hrulefill
  2. \hrulefill
  3. \hrulefill
3 1 mark multiple_choice p. 2 8.1

Tick ($\checkmark$) one box to identify the operator that returns the quotient of a calculation with the fractional part discarded.

  1. A

    /

  2. B

    \texttt{DIV}

  3. C

    ^{}

  4. D

    \texttt{MOD}

4 short_answer p. 3

A restaurant offers a fixed priced menu. A meal for an adult costs $9.99 and a meal for a child costs$6.99.

If there are 6 or more people at a table, a 15% discount is applied to the total cost of the order.

4a 5 marks long_answer p. 3 7

Write an algorithm in pseudocode to:

\begin{itemize} \item input the number of adults and the number of children at a table \item calculate the total cost of the order with the discount, if this applies \item output the final cost of the order. \end{itemize}

4b 2 marks short_answer p. 3 8.1

The final cost of the order after the discount may have more than 2 decimal places.

Write a pseudocode statement to set the final cost of the order to 2 decimal places. You do \textbf{not} need to rewrite the whole algorithm.

4c short_answer p. 4

The restaurant offers a discount on a meal if the person ordering is either a student or is 65 years or older. The discount ($X = 1$) can only be given if the amount of the order is $20.00 or over.

\begin{tabular}{|c|l|c|} \hline rule A & a student & 0 \ \cline{2-3} & not a student & 1 \ \hline rule B & under 65 years old & 0 \ \cline{2-3} & 65 years or older & 1 \ \hline rule C & under $20.00 & 0 \ \cline{2-3} & $20.00 or over & 1 \ \hline \end{tabular}

4ci 2 marks short_answer p. 4 10

Write the logic expression for this problem.

4cii 3 marks short_answer p. 4 10

Draw a logic circuit for this logic expression.

Each logic gate must have a maximum of \textbf{two} inputs. Do \textbf{not} simplify this logic expression.

4d 2 marks short_answer p. 4 10

Draw the NAND logic gate symbol \textbf{and} complete the truth table for it.

NAND logic gate symbol:

Truth table:

\begin{tabular}{|c|c|c|} \hline \textbf{A} & \textbf{B} & \textbf{X} \ \hline 0 & 0 & \ \hline 0 & 1 & \ \hline 1 & 0 & \ \hline 1 & 1 & \ \hline \end{tabular}

5 4 marks short_answer p. 5 7

A hotel booking system is an example of a computer system that is made up of sub-systems.

The booking system: \begin{itemize} \item allows the user to select the room type and the number of nights required \item displays the types of rooms available to the user as pictures or as a list. \end{itemize}

Complete the structure diagram for the given parts of the hotel booking system.

6 short_answer p. 7
(no root text)
6a 4 marks short_answer p. 7 7

Identify the line numbers of the \textbf{four} 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

Error 4 line number \hrulefill

Correction \hrulefill

6b 3 marks long_answer p. 7 7

Explain how you could modify the pseudocode to validate that each input is a single digit.

Any code must be fully explained.

6c 2 marks short_answer p. 7 7

The 5-digit number needs to be entered as a single input.

Describe \textbf{one} verification method that could be applied to the input of the 5-digit number.

7 short_answer p. 9
(no root text)
7a 4 marks short_answer p. 9 7

Complete the tables, using the flowchart, for the given data:

Input data: 20

\begin{tabular}{|c|c|c|c|} \hline \textbf{Count} & \textbf{Number} & \textbf{Value} & \textbf{Output} \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline \end{tabular}

\vspace{1em}

Input data: 110

\begin{tabular}{|c|c|c|c|} \hline \textbf{Count} & \textbf{Number} & \textbf{Value} & \textbf{Output} \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline & & & \ \hline \end{tabular}

7b 1 mark short_answer p. 10 7

State the purpose of the algorithm on page 8. A copy of the algorithm is provided for you on page 11.

7c 1 mark short_answer p. 10 8.1

State a suitable data type for the variable \texttt{Count}

7d 4 marks long_answer p. 10 7

Write the algorithm in pseudocode. A copy of the algorithm is provided for you on page 11.

8 short_answer p. 12

A school has set up a database table \texttt{SchoolTrip} to record details of students that will go on a school trip.

\begin{tabular}{|l|l|l|l|l|} \hline \textbf{StudentID} & \textbf{StudentName} & \textbf{ParentName} & \textbf{Permission} & \textbf{DateReceived} \ \hline STU147 & Amir & Mr Akar & True & 03/03/2025 \ \hline STU348 & Filip & Mrs Johnson & True & 04/03/2025 \ \hline STU274 & Matthew & Mr Smith & False & \ \hline STU873 & Jafar & Mr Al-Saigh & True & 21/03/2025 \ \hline STU221 & Hussein & Mr Alkasab & True & 28/02/2025 \ \hline STU553 & Julie & Mrs Jones & True & 25/02/2025 \ \hline STU213 & Julie & Mr Smith & False & \ \hline \end{tabular}

8a 1 mark short_answer p. 12 9

State the reason why \texttt{ParentName} is not appropriate as the primary key.

8b 1 mark short_answer p. 12 9

Give the name of the field that should be the primary key.

8c 2 marks short_answer p. 12 9

The database only uses these data types:

\begin{itemize} \item text \item character \item Boolean \item integer \item real \item date/time \end{itemize}

Complete the table to show the most appropriate data type for each field. Each data type must be different.

\begin{tabular}{|l|l|} \hline \multicolumn{1}{|c|}{\textbf{Field}} & \multicolumn{1}{c|}{\textbf{Data type}} \ \hline \texttt{ParentName} & \ \hline \texttt{Permission} & \ \hline \texttt{DateReceived} & \ \hline \end{tabular}

8d 2 marks short_answer p. 12 9

Complete the structured query language (SQL) statement to display only the names of the students who do not have permission to go on the trip.

SELECT \hrulefill FROM \hrulefill WHERE \hrulefill

9 4 marks long_answer p. 13 8.3

A school stores all the students’ attendance data in a file called \texttt{Attendance.txt}

Write an algorithm in pseudocode to read a line of text from the file and store this line in the variable \texttt{StudentAttendance}

10 short_answer p. 13

The variables \texttt{Seconds} and \texttt{Minutes} are used in a program. \texttt{Seconds} holds the number of seconds as a whole number and \texttt{Minutes} holds the number of minutes as a whole number.

10a 1 mark short_answer p. 13 8.1

Write pseudocode statements to declare the variables \texttt{Seconds} and \texttt{Minutes}

10b 4 marks long_answer p. 13 8.1

The procedure \texttt{Time(TotalSeconds)} takes the number of seconds as a parameter. The procedure converts the value held in the parameter into minutes and seconds and outputs the result.

Write this procedure in pseudocode.

11 15 marks long_answer p. 14 8.2

The scores for each competitor in an archery competition are recorded.

The one-dimensional (1D) array \texttt{CompetitorName[]} is used to store the names of the competitors.

The maximum number of competitors is 30.

There are 10 rounds in the competition with a maximum score of 30 per round.

The two-dimensional (2D) array \texttt{CompetitorScore[]} stores the score in each of the 10 rounds for each competitor.

The first index of the array \texttt{CompetitorScore[]} is the same as the index of the competitor in \texttt{CompetitorName[]}

After the 10 rounds have been completed, the highest score and the lowest score for each competitor are discarded.

The overall score for each competitor is the total of the remaining 8 scores (after discarding the highest and lowest scores).

A competitor with an overall score of 210 or more moves onto the next competition. A competitor with an overall score between 180 and 209 inclusive becomes a reserve competitor. A competitor with an overall score below 180 does not qualify.

Write a program that meets the following requirements:

\begin{itemize} \item inputs the total score (out of 30) for each competitor in each round \item validates each input is between 0 and 30 inclusive \item calculates the overall score for each competitor discarding the highest and lowest scores \item outputs the name of each competitor and if they move onto the next competition, are a reserve or do not qualify \item calculates and outputs the number of competitors who: \begin{itemize} \item have qualified for the next competition \item are reserve competitors \item do not qualify. \end{itemize} \end{itemize}

You must use pseudocode or program code \textbf{and} add comments to explain how your code works.

You do \textbf{not} need to declare any arrays or variables; assume that this has already been done.

All inputs and outputs must contain suitable messages.

Log in or create account

IGCSE & A-Level