IGCSE Computer Science 0478 Paper 22, May/June 2026

Question paper and mark scheme75 marks8 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/22 · May/June 2026

Download PDF
3
a(i)

Identify the type of validation check used in each description. (i) A check to make sure that data has been input and not left blank.

[1]
a(ii)

(ii) A value placed at the end of a sequence of numbers in the code. The value is calculated from all the other values before it.

[1]
b

Explain the purpose of a format check and give an example of where it could be used. purpose ..................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... example .................................................................................................................................... ...................................................................................................................................................

[3]
c

Write the pseudocode for an algorithm to perform a validation check on each number as it is input, using the following criteria: • Input one number at a time. • If the number is a whole number, store it in the current element of array Accepted[] • If the number is not a whole number, ask for it to be input again until it is a whole number. • When 15 whole numbers have been stored, output a message that states the check has been completed. Use appropriate input prompts and output messages to make the requirements clear to the user. You do not need to declare any arrays or variables for this algorithm.

[6]
4

The program development life cycle is split into several stages. Outline what happens during the coding and testing stages of the program development life cycle. coding ............................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... testing ............................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[6]
5

The purpose of this pseudocode algorithm is to find the name of a customer using an account ID, which contains letters and numbers. The name of the customer and the account ID are stored in the prepopulated two-dimensional (2D) array Accounts[]. The algorithm would then output the name of the customer. For example, Accounts[1, 1] contains the account ID of the first customer and Accounts[1, 2] contains the name of the first customer. 01 DECLARE Accounts : ARRAY[1:1000, 1:2] OF STRING 02 DECLARE Row : INTEGER 03 DECLARE AccountID : INTEGER 04 OUTPUT "Please enter an account ID " 05 OUTPUT AccountID 06 FOR Row 1 TO 1000 07 CASE OF AccountID = Accounts[Row, 1] 08 THEN 09 OUTPUT "The customer’s name is ", Accounts[1, 2] 10 ENDIF 11 NEXT Row

Figure 1 of 1 for question 5
a

Identify the line numbers of four errors in the pseudocode and suggest corrections. error 1 line number .............................. correction .................................................................................................................................. ................................................................................................................................................... error 2 line number .............................. correction .................................................................................................................................. ................................................................................................................................................... error 3 line number .............................. correction .................................................................................................................................. ................................................................................................................................................... error 4 line number .............................. correction .................................................................................................................................. ...................................................................................................................................................

[4]
b

State the name given to this type of algorithm.

[1]
c

The algorithm stops if the account number is not found in the array. Write the pseudocode statements to change the algorithm to inform the user that the account number has not been found in the array. Clearly state where in the original algorithm your new statements would be placed. Do not rewrite the whole algorithm.

[5]
6

This flowchart represents an algorithm.

a

Complete the trace table for the algorithm, using the input data: post, Y, committee, N, bookkeeper Note: the first character of each word is in position 1.

[6]
b

State the purpose of the algorithm shown by the flowchart.

[1]
7
a

State one reason to store data in a file.

[1]
b

A list of names of the members of a club are stored in a file called Names.txt Write the pseudocode statements to load a line of text from Names.txt and assign the line of text to an appropriately named variable.

[4]
8

Consider the logic expression: Z = NOT (B OR NOT C) XOR (A NAND C)

a

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

[5]
b

Complete the truth table from the given logic expression.

[4]
9
a

A database table CAR_PARTS stores details of car parts that a business has in stock. Complete the table by giving the most appropriate data types for each field. Only the data types: text, character, Boolean, integer, real and date/time are available in this database.

[4]
b

Complete the structured query language (SQL) statement to list only the part ID, type of car and the quantity in stock of all the car parts that are brake pads. SELECT ..................................................................................................................................... FROM ......................................................................................................................................... WHERE ..................................................................................................................................... ;

[4]
c

Describe one reason why the InStock field is not needed in the table.

[2]
10

A program is required to record and analyse the daily rainfall in millimetres for one year. Assume a year has 365 days. The one-dimensional (1D) array Rainfall[] is used to store the daily rainfall measurements. Write a program for the following requirements: • Initialise the array Rainfall[] to zero. • Input the rainfall measurement in millimetres for each day and store it in the array. • Calculate the following statistics after all the inputs have been made for the year: ◦ the total rainfall for the year in centimetres (1 centimetre = 10 millimetres), rounded to two decimal places ◦ the mean average daily rainfall in millimetres, rounded to four decimal places ◦ the total number of days with no rainfall ◦ the longest number of consecutive days in which there was no rainfall. • Output all the calculated statistics with clear and appropriate messaging. • If the longest number of consecutive days in which there was no rainfall is 15 or more, output a message to indicate there was a drought (a long period when there is little or no rainfall). You must use pseudocode or program code and add comments to explain how your code works. All arrays, variables or constants used must be declared for this algorithm. All inputs and outputs must contain suitable messages.

[15]

Mark scheme

0478/22 · May/June 2026

Download PDF

3a(i) · 1 mark

  • 1 mark

    Presence (check)

3a(ii) · 1 mark

  • 1 mark

    Check digit

3b · 3 marks

  • 1 mark

    To check that the input matches a specified / required style / pattern / structure

  • 1 mark

    … by containing set numbers of letters and numbers // … by containing specified groups of digits // … by containing specific characters within the text

  • 1 mark

    An example of a format e.g. date format dd/mm/yyyy

3c · 6 marks

  • 1 mark

    Appropriate loop to iterate for 15 inputs

  • 1 mark

    Input of a number

  • 1 mark

    Test if the input is an integer e.g. use of MOD, DIV or ROUND functions

  • 1 mark

    Repeated re-input if number not an integer, until it is an integer

  • 1 mark

    Store integer in the correct array location

  • 1 mark

    At least two outputs seen, from input prompt / error message / completion message.

4 · 6 marks

  • 1 mark

    Writing the program code in a programming/coding language

  • 1 mark

    … using pseudocode/flowcharts/structure diagrams from the design/earlier stage to create your code

  • 1 mark

    Documenting your code with comments // making sure your code is maintainable

  • 1 mark

    Writing procedures/functions // Use library routines/functions

  • 1 mark

    Using a compiler/interpreter/IDE when writing the code

  • 1 mark

    Testing the code in small parts as you write it allow iterative testing

  • 1 mark

    … to ensure that it works correctly / as expected // … to refine your code

  • 1 mark

    The final stage of testing the whole program for errors

  • 1 mark

    Use of test data with known outcomes

  • 1 mark

    … to ensure the whole program produces the expected outcomes (from the test data) // … to make sure the program accepts valid data and rejects invalid data

  • 1 mark

    Correct errors // debug the code

  • 1 mark

    Allow one mark max for identifying at least two types of test data e.g. normal, abnormal, boundary, extreme

5a · 4 marks

  • 1 mark

    Line 03 / DECLARE AccountID : INTEGER should be DECLARE AccountID : STRING

  • 1 mark

    Line 05 / OUTPUT AccountID should be INPUT AccountID

  • 1 mark

    Line 07 / CASE OF AccountID = Accounts[Row, 1] should be IF AccountID = Accounts[Row, 1]

  • 1 mark

    Line 09 / OUTPUT "The customer’s name is ", Accounts[1, 2] should be OUTPUT "The customer’s name is ", Accounts[Row, 2]

5b · 1 mark

  • 1 mark

    Linear search

5c · 5 marks

  • 1 mark

    Use/initialise a flag at the start / before line 06

  • 1 mark

    Flag  FALSE // Flag  0

  • 1 mark

    Between lines 08 and 10 (where the item has been found)

  • 1 mark

    Flag  TRUE // Flag  1

  • 1 mark

    Outside the loop / after line 11 add another selection statement and output

  • 1 mark

    IF Flag = False …

  • 1 mark

    … THEN OUTPUT "Account number not found in the array" ENDIF

  • 1 mark

    Replace lines 06 and 11 and increment counter before line 11

  • 1 mark

    WHILE NOT Flag AND Row <= 1000 (DO)

  • 1 mark

    Row  Row + 1 and ENDWHILE

6a · 6 marks

  • 1 mark

    Correct Word column

  • 1 mark

    Correct WordLength column

  • 1 mark

    Correct Count column

  • 1 mark

    Correct NumLetter column

  • 1 mark

    Correct Choice column

  • 1 mark

    Correct OUTPUT column

6b · 1 mark

  • 1 mark

    Counting/outputting the number of double/repeated/pairs of letters in a word

7a · 1 mark

  • 1 mark

    So the data is stored permanently // provides a non-volatile copy

  • 1 mark

    So the data is not lost if the machine/program is switched off/crashes

  • 1 mark

    So the data can be used again later // to provide a backup

  • 1 mark

    So the data can be transported to a different (offline) computer // so the data can be shared

7b · 4 marks

  • 1 mark

    Declaration of an appropriately named variable

  • 1 mark

    Correct statement to open Names.txt for reading

  • 1 mark

    Correct statement to read data from the file into a variable

  • 1 mark

    Correct statement to close Names.txt

8a · 5 marks

  • 1 mark

    Correct NOT gate on input C

  • 1 mark

    Correct AND gate with inputs A and B

  • 1 mark

    Correct OR gate with inputs B and NOT C

  • 1 mark

    Correct NOT gate following the OR gate

  • 1 mark

    Correct XOR gate with inputs from AND and NOR, giving output Z

8b · 4 marks

  • 1 mark

    Two or three correct outputs

  • 1 mark

    Four or five correct outputs

  • 1 mark

    Six or seven correct outputs

  • 1 mark

    Eight correct outputs

9a · 4 marks

  • 1 mark

    Two correct data types

  • 1 mark

    Four correct data types

  • 1 mark

    Six correct data types

  • 1 mark

    Eight correct data types

9b · 4 marks

  • 1 mark

    At least two correct fields in SELECT row

  • 1 mark

    Remaining correct field in SELECT row

  • 1 mark

    Correct FROM CAR_PARTS

  • 1 mark

    Correct WHERE PartName = "brake pads";

9c · 2 marks

  • 1 mark

    There is an alternative field NumberInStock

  • 1 mark

    … a value of 0 in this field indicates the item is out of stock // … a positive value in this field indicates the item is in stock // … this field indicates the quantity in stock

10 · 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, presenting conclusions (max 6 marks)

Questions

  1. 3
    Question 311 marks
    Mark scheme ›
  2. 4
    Question 46 marks
    Mark scheme ›
  3. 5
    Question 510 marks
    Mark scheme ›
  4. 6
    Question 67 marks
    Mark scheme ›
  5. 7
    Question 75 marks
    Mark scheme ›
  6. 8
    Question 89 marks
    Mark scheme ›
  7. 9
    Question 910 marks
    Mark scheme ›
  8. 10
    Question 1015 marks
    Mark scheme ›

More 0478 papers

Other papers from May/June 2026

Solve it on ExamPalStart