IGCSE Computer Science 0478 Paper 21, Oct/Nov 2025

Question paper and mark scheme75 marks10 questions

Solve it on ExamPal

Practise

Untimed. Write on the paper and check as you go.

Start

Exam

Timed, with a clock you set, like sitting the real paper.

Start

Opens full screen.

Opening the question paper

Read as textThe questions and the mark scheme as plain text. Easier to read on a phone.

Question paper

0478/21 · Oct/Nov 2025

Download PDF
1

Four descriptions of structured query language (SQL) keywords and five SQL keywords are given. Draw one line from each description to its matching keyword. Not all SQL keywords will be used.

[4]
2

Identify three different types of test data that can be used to test a program.

[3]
4
a

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. Write an algorithm in pseudocode to: • input the number of adults and the number of children at a table • calculate the total cost of the order with the discount, if this applies • output the final cost of the order.

[5]
b

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 not need to rewrite the whole algorithm.

[2]
c(i)

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. Write the logic expression for this problem.

[2]
c(ii)

Draw a logic circuit for this logic expression. Each logic gate must have a maximum of two inputs. Do not simplify this logic expression.

[3]
d

Draw the NAND logic gate symbol and complete the truth table for it. NAND logic gate symbol: Truth table:

[2]
5

A hotel booking system is an example of a computer system that is made up of sub-systems. The booking system: • allows the user to select the room type and the number of nights required • displays the types of rooms available to the user as pictures or as a list. Complete the structure diagram for the given parts of the hotel booking system.

[4]
Figure 1 of 1 for question 5
6

A check digit is one method to validate a 5-digit number. The check digit for a 5-digit number is calculated as follows: • Each digit is multiplied by its position (the first digit on the left is in position 1). • The result of each multiplication is totalled. • MOD(Total, 11) is used to calculate the check digit. • If the result of the MOD function is 10, the check digit is ‘X’. For example: The calculation of the check digit for the 5-digit number 30475 is as follows: Multiply each digit by its position and total the results: (3 * 1) + (0 * 2) + (4 * 3) + (7 * 4) + (5 * 5) = 68 Calculate the check digit with MOD(Total, 11) MOD(68, 11) = 2 The check digit for 30475 is 2 This pseudocode algorithm should calculate and output the check digit of a 5-digit number: 01 DECLARE Total : INTEGER 02 DECLARE Digit : INTEGER 03 DECLARE CheckDigit : CHAR 04 Total 0 05 FOR Count 1 TO 10 06 OUTPUT "Please enter digit ", Count 07 INPUT Digit 08 Total Total + (Digit / Count) 09 NEXT Count 10 CheckDigit MOD(Total, 11) 11 IF CheckDigit = 10 12 THEN 13 OUTPUT "The check digit is X" 14 ELSE 15 OUTPUT "The check digit is ", Count 16 ENDIF

a

Identify the line numbers of the four errors in the pseudocode and suggest a correction for each error.

[4]
b

Explain how you could modify the pseudocode to validate that each input is a single digit. Any code must be fully explained.

[3]
c

The 5-digit number needs to be entered as a single input. Describe one verification method that could be applied to the input of the 5-digit number.

[2]
7

The flowchart represents an algorithm.

Figure 1 of 12 for question 7
Figure 2 of 12 for question 7
Figure 3 of 12 for question 7
Figure 4 of 12 for question 7
Figure 5 of 12 for question 7
Figure 6 of 12 for question 7
Figure 7 of 12 for question 7
Figure 8 of 12 for question 7
Figure 9 of 12 for question 7
Figure 10 of 12 for question 7
Figure 11 of 12 for question 7
Figure 12 of 12 for question 7
a

Complete the tables, using the flowchart, for the given data: Input data: 20 Input data: 110

[4]
b

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

[1]
c

State a suitable data type for the variable Count

[1]
d

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

[4]
8

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

a

State the reason why ParentName is not appropriate as the primary key.

[1]
b

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

[1]
c

The database only uses these data types: • text • character • Boolean • integer • real • date/time. Complete the table to show the most appropriate data type for each field. Each data type must be different.

[2]
d

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 ..................................................................................................................................... FROM ......................................................................................................................................... WHERE .......................................................................................................................................

[2]
9

A school stores all the students’ attendance data in a file called Attendance.txt Write an algorithm in pseudocode to read a line of text from the file and store this line in the variable StudentAttendance

[4]
10

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

a

Write pseudocode statements to declare the variables Seconds and Minutes

[1]
b

The procedure 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.

[4]
11

The scores for each competitor in an archery competition are recorded. The one-dimensional (1D) array 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 CompetitorScore[] stores the score in each of the 10 rounds for each competitor. The first index of the array CompetitorScore[] is the same as the index of the competitor in 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: • inputs the total score (out of 30) for each competitor in each round • validates each input is between 0 and 30 inclusive • calculates the overall score for each competitor discarding the highest and lowest scores • outputs the name of each competitor and if they move onto the next competition, are a reserve or do not qualify • calculates and outputs the number of competitors who: ◦ have qualified for the next competition ◦ are reserve competitors ◦ do not qualify. You must use pseudocode or program code 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 inputs and outputs must contain suitable messages.

[15]

Mark scheme

0478/21 · Oct/Nov 2025

Download PDF

1 · 4 marks

  • 1 mark

    identifies the database table -> FROM

  • 1 mark

    sets the condition -> WHERE

  • 1 mark

    sorts the results -> ORDER BY

  • 1 mark

    returns the number of records -> COUNT

2 · 3 marks

  • 1 mark

    normal

  • 1 mark

    abnormal

  • 1 mark

    extreme

  • 1 mark

    boundary

4a · 5 marks

  • 1 mark

    input of adult and child number

  • 1 mark

    calculation of total without discount

  • 1 mark

    check if total people are 6 or more

  • 1 mark

    … apply discount to total

  • 1 mark

    output of the total

4b · 2 marks

  • 1 mark

    Correct use of ROUND

  • 1 mark

    … to 2 decimal places

4c(i) · 2 marks

  • 1 mark

    ( NOT A OR B)

  • 1 mark

    AND C

4c(ii) · 3 marks

  • 1 mark

    Correct NOT gate on input A

  • 1 mark

    Correct OR gate on output of NOT and B

  • 1 mark

    Correct AND gate on output of OR and C

4d · 2 marks

  • 1 mark

    One mark for correct symbol (NAND gate)

  • 1 mark

    One mark for correctly completed table (outputs 1, 1, 1, 0)

5 · 4 marks

  • 1 mark

    One mark for a suitable hierarchical structure

  • 1 mark

    One mark for suitable names for the sub systems for user input and display options

  • 1 mark

    One mark for sub systems for user inputs, room type and number of nights

  • 1 mark

    One mark for sub systems for display output types, pictures and list

6a · 4 marks

  • 1 mark

    Line 03 – should be DECLARE CheckDigit : INTEGER

  • 1 mark

    Line 05 – should be FOR Count  1 TO 5

  • 1 mark

    Line 08 – should be Total  Total + (Digit * Count)

  • 1 mark

    Line 15 – should be OUTPUT "The check digit is ", CheckDigit

6b · 3 marks

  • 1 mark

    After the for loop but before the total/after line 07

  • 1 mark

    use a suitable loop (repeat/while)

  • 1 mark

    … checking digit is 0 to 9

  • 1 mark

    re-input digit in the loop

6c · 2 marks

  • 1 mark

    visual check and … look at the data that has been entered and confirm it matches

  • 1 mark

    double entry and … enter data twice and only accept identical values

7a · 4 marks

  • 1 mark

    Count column correct across both tables

  • 1 mark

    Number column correct across both tables

  • 1 mark

    Value column correct across both tables

  • 1 mark

    Output column correct across both tables

7b · 1 mark

  • 1 mark

    DIV algorithm / Integer division / to find how many times the number goes into 100

7c · 1 mark

  • 1 mark

    Integer

7d · 4 marks

  • 1 mark

    declare Count

  • 1 mark

    initialise Count / use of while/repeat

  • 1 mark

    use of DIV / correct condition

  • 1 mark

    with correct parameters / output of correct count

8a · 1 mark

  • 1 mark

    parent name can be repeated / not unique

8b · 1 mark

  • 1 mark

    StudentID

8c · 2 marks

  • 1 mark

    1 or 2 correct data types

  • 1 mark

    3 correct data types

8d · 2 marks

  • 1 mark

    Two lines correct (SELECT StudentName / FROM SchoolTrip / WHERE Permission = False;)

  • 1 mark

    All three lines correct (SELECT StudentName, FROM SchoolTrip, WHERE Permission = False;)

9 · 4 marks

  • 1 mark

    correctly opening Attendance.txt for read

  • 1 mark

    use of READFILE

  • 1 mark

    … and storing in StudentAttendance

  • 1 mark

    closing Attendance.txt

10a · 1 mark

  • 1 mark

    Both declarations correct (DECLARE Seconds : INTEGER and DECLARE Minutes : INTEGER)

10b · 4 marks

  • 1 mark

    PROCEDURE and ENDPROCEDURE naming the procedure Time with parameter

  • 1 mark

    correctly calculating minutes

  • 1 mark

    correctly calculating seconds

  • 1 mark

    output the minutes and seconds

11 · 15 marks

  • 9 marks

    AO2: Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the analysis and design of computational or programming problems (Max 9 marks)

  • 6 marks

    AO3: Provide solutions to problems by evaluating computer systems, making reasoned judgements, and presenting conclusions (Max 6 marks)

Questions

  1. 1
    Question 14 marks
    Mark scheme ›
  2. 2
    Question 23 marks
    Mark scheme ›
  3. 4
    Question 414 marks
    Mark scheme ›
  4. 5
    Question 54 marks
    Mark scheme ›
  5. 6
    Question 69 marks
    Mark scheme ›
  6. 7
    Question 710 marks
    Mark scheme ›
  7. 8
    Question 86 marks
    Mark scheme ›
  8. 9
    Question 94 marks
    Mark scheme ›
  9. 10
    Question 105 marks
    Mark scheme ›
  10. 11
    Question 1115 marks
    Mark scheme ›

More 0478 papers

Other papers from Oct/Nov 2025

Solve it on ExamPalStart