IGCSE Computer Science 0478 Paper 23, 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/23 · May/June 2026

Download PDF
3
a(i)

Identify the type of test data in each description. Data that falls within the accepted parameters of a validation check and is accepted.

[1]
a(ii)

Data that is the highest or lowest value to be accepted.

[1]
b

Explain the purpose of a check digit 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 and a verification check on a new password to meet the following criteria: 1 Input a new password. 2 If the password is less than 10 characters in length, ask for it to be input again until it is at least 10 characters in length. 3 If the password is at least 10 characters in length, ask for it to be input a second time. 4 If both inputs of the new password match, output a password accepted message. 5 If both inputs of the new password do not match, go back to step 1 and ask for the new password to be input for the first time. Use appropriate input prompts and output messages to make the requirements clear to the user. Do not declare any arrays or variables for this algorithm.

[6]
4

This pseudocode algorithm is intended to store the names of up to 250 runners who finish a race. The names of the runners are stored in a one-dimensional (1D) array Runners[] and their time in seconds in a one-dimensional (1D) array Times[]. After the time for each runner has been entered into the array, the name of the runner and the time of the runner in minutes and seconds are displayed for verification. Each runner takes 60 minutes or less to finish the race. A time of 60 minutes would be entered as 3600 seconds. 01 DECLARE Runners : ARRAY[1:250] OF STRING 02 DECLARE Times : ARRAY[1:250] OF INTEGER 03 DECLARE Index : INTEGER 04 DECLARE RunName : STRING 05 DECLARE RunTime : STRING 06 DECLARE RunMins : INTEGER 07 DECLARE RunSecs : INTEGER 08 FOR Index ← 1 TO 250 09 OUTPUT "Enter a runner’s name and then time (in seconds) " 10 INPUT RunName 11 OUTPUT RunTime 12 RunMins ← DIV(RunTime, 60) 13 RunSecs ← DIV(RunTime, 60) 14 OUTPUT "Runner’s Name: ", RunName 15 OUTPUT "Time: ", RunMins, " Minutes ", RunSecs, " Seconds" 16 Runners[Index] ← RunMins 17 Times[Index] ← RunTime 18 NEXT Index

Figure 1 of 1 for question 4
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(i)

The algorithm is intended to work for positive finish times that are 3600 seconds or less, but any number of seconds can currently be input. Write the pseudocode statements to show how you would change the algorithm so that only times in the correct range could be input. The time taken to finish the race needs to be input again until valid data is input. Clearly state where in the original algorithm your new statements would be placed. Do not rewrite the whole algorithm.

[5]
b(ii)

Identify one other possible problem with the algorithm.

[1]
5

This flowchart represents an algorithm.

a

Complete the trace table for the algorithm, using the input data: 49.8, 48.7, 62.5, 49.9, 30.0, 58.2, –12.5, 50.0, 26.7, –49.2, 58.9

[5]
b

Describe how you would change the flowchart to prevent negative numbers from being input.

[2]
6

The string "I learnt to program in computer science" will be stored in the variable Fact

a

Complete the pseudocode algorithm to: • calculate and output the length of the string stored in the variable Fact • output, in upper case, the string stored in the variable Fact Fact ← "I learnt to program in computer science"

[3]
b

Write the pseudocode statements to use a string function to output the word program taken from the string stored in the variable Fact Do not declare any variables.

[2]
7

Consider the logic expression: X is 1 if (P = NOT 1 AND Q = 1) XOR (Q = 1 NOR R = 1)

a

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

[4]
b

Complete the truth table from the given logic expression.

[4]
8

A database table OPTION_SUBJECTS stores some data about a number of subjects taken by students in a college. field | description SubjectCode | a code such as CSIG01 to represent the subject and level SubjectName | the name of the subject, for example computer science Level | the level of the course, for example IGCSE or A Level CourseWork | whether or not coursework is included as part of the assessment PracticalExams | the number of practical exams taken during the course TheoryExams | the number of theory exams taken during the course CourseLength | length of the course, for example 1 or 2, representing number of years MinimumClassSize | the minimum number of students required for the course to run, for example 10 MaximumClassSize | the maximum number of students admitted to each class, for example 30

a

Identify the most appropriate field in OPTION_SUBJECTS for a primary key. Give one reason for your choice. primary key field ....................................................................................................................... reason ....................................................................................................................................... ...................................................................................................................................................

[2]
b

Identify one appropriate field from OPTION_SUBJECTS for each of the given data types. State one reason for your choice in each case. integer data type ....................................................................................................................... reason ....................................................................................................................................... ................................................................................................................................................... Boolean data type ..................................................................................................................... reason ....................................................................................................................................... ...................................................................................................................................................

[4]
c

Complete the structured query language (SQL) statement to list only the subject code, subject name and level for the minimum class size of less than 10. The results should be listed in order of subject code, from the lowest to the highest. SELECT ..................................................................................................................................... FROM ......................................................................................................................................... WHERE ....................................................................................................................................... ................................................................................................................................................. ;

[5]
9

Outline two techniques that can be used to create a maintainable program. 1 ....................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... 2 ....................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[6]
10

Five rivers show signs of pollution and are to be monitored daily for a period of 30 days. The one-dimensional (1D) array RiverNames[] stores the names of the rivers. The two-dimensional (2D) array RiverStats[] stores the daily measurement of biological oxygen demand (BOD) for each river. The two-dimensional (2D) array DaysCount[] stores the number of days each river is classed as moderately polluted and the number of days each river is classed as highly polluted. The position of the data for any river is the same in all three arrays. For example, the data in index 2 of RiverStats[] belongs to the river in index 2 of RiverNames[] Write a program for the following requirements: • Input and store the names of the rivers in the array RiverNames[] • For each river, input and store in the array RiverStats[], the daily BOD in milligrams per litre (mg/L) on each of the 30 days. • Once all the inputs for the 30 days have been completed, the following statistics are calculated, and when appropriate, stored: ◦ The average daily reading for each river, rounded to two decimal places. ◦ The number of days in which the BOD reading was between 2mg/L and 8mg/L inclusive (moderate pollution) for each river. ◦ The number of days in which the BOD reading was greater than 8mg/L (high pollution) for each river. • Output for each river, the average daily BOD readings, the number of days with moderate pollution and the number of days with high pollution. • Find and output the name of the river that has the most days with high pollution. The program does not need to identify more than one river with an equally high pollution reading. You must use pseudocode or program code and add comments to explain how your code works. Do not declare arrays, variables or constants for this algorithm; assume this has been done. You will need to initialise the arrays and any variables used for counting or totalling before they are used. All inputs and outputs must contain suitable messages.

[15]

Mark scheme

0478/23 · May/June 2026

Download PDF

3a(i) · 1 mark

  • 1 mark

    Normal (test data)

3a(ii) · 1 mark

  • 1 mark

    Extreme (test data)

3b · 3 marks

  • 1 mark

    A value to instantly verify the accuracy of data

  • 1 mark

    that is calculated from the input

  • 1 mark

    An example, for example the last digit of an ISBN code on a book / bar code / credit card / parity bit

3c · 6 marks

  • 1 mark

    First input for new password

  • 1 mark

    Checking the length of the new password

  • 1 mark

    Means to re-renter the new password if the length check fails, until it passes

  • 1 mark

    Re-input of new password …

  • 1 mark

    and check if it matches the first input

  • 1 mark

    Means to re-start, indefinitely, the input process from the beginning if the verification fails

  • 0 marks

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

4a · 4 marks

  • 1 mark

    Line 05 / DECLARE RunTime : STRING should be DECLARE RunTime : INTEGER

  • 1 mark

    Line 11 / OUTPUT RunTime should be INPUT RunTime

  • 1 mark

    Line 13 / RunSecs ← DIV(RunTime, 60) should be RunSecs ← MOD(RunTime, 60)// RunTime – RunMins * 60

  • 1 mark

    Line 16 / Runners[Index] ← RunMins should be Runners [Index] ← RunName

4b(i) · 5 marks

  • 1 mark

    Use a condition-controlled loop inside the existing loop before the RunTime input

  • 1 mark

    REPEAT // WHILE RunTime <1 OR RunTime > 3600 (DO)

  • 1 mark

    After line 11 / INPUT RunTime, …

  • 1 mark

    insert a selection statement with a range check (and error message)

  • 1 mark

    IF RunTime < 1 OR RunTime > 3600 (not required for WHILE loop version)

  • 0 marks

    OUTPUT "The time must be positive and no greater than 3600 seconds"

  • 0 marks

    Finish the repeat loop before the calculations start / before line 12

  • 0 marks

    UNTIL RunTime >0 AND RunTime <= 3600 // ENDWHILE

4b(ii) · 1 mark

  • 1 mark

    The original FOR loop will always iterate 250 times, even if there are not 250 runners. / Only 250 runners are allowed in the array. / Two athletes could have the same name, so would be difficult to identify. / Answers related to validation or verification are acceptable.

5a · 5 marks

  • 1 mark

    PassCount column correct

  • 1 mark

    FailCount column correct

  • 1 mark

    Count column correct

  • 1 mark

    Size column correct

  • 1 mark

    OUTPUT column correct

5b · 2 marks

  • 1 mark

    Add another decision box after the input box and before the existing decision box.

  • 1 mark

    Check for values <0 inside this decision box

  • 0 marks

    If the condition fails, loop back to the input box for re-input // if the condition passes, go to the next decision box

6a · 3 marks

  • 1 mark

    Correct use of LENGTH function with Fact

  • 1 mark

    Correct use of UCASE function with Fact

  • 1 mark

    Contents of LENGTH and UCASE both output (can be both in same OUTPUT statement)

6b · 2 marks

  • 1 mark

    Correct use of SUBSTRING with Fact

  • 1 mark

    and two other parameters (13 and 7) as an OUTPUT statement, accept 12 and 7

7a · 4 marks

  • 1 mark

    NOT gate connected to input P

  • 1 mark

    AND gate with inputs from NOT gate and Q

  • 1 mark

    NOR gate with inputs from Q and R

  • 1 mark

    XOR gate with inputs from AND gate and NOR gate outputting to X

7b · 4 marks

  • 4 marks

    Four marks for eight correct outputs (X column) (Three marks for six or seven, Two marks for four or five, One mark for two or three)

8a · 2 marks

  • 1 mark

    primary key: SubjectCode

  • 1 mark

    Reason: it is unique for that subject and level

8b · 4 marks

  • 1 mark

    PracticalExams/TheoryExams/MinimumClassSize/MaximumClassSize/ CourseLength/TheoryExams

  • 1 mark

    must be represented by whole numbers

  • 1 mark

    CourseWork

  • 1 mark

    this is a yes/no field, either there is coursework or there is no coursework

8c · 5 marks

  • 1 mark

    At least two correct fields in SELECT

  • 1 mark

    Remaining correct field in SELECT

  • 1 mark

    Correct FROM OPTION_SUBJECTS

  • 1 mark

    Correct WHERE MinimumClassSize < 10

  • 1 mark

    Correct ORDER BY SubjectCode;

9 · 6 marks

  • 1 mark

    Use of commenting

  • 1 mark

    to describe sections of code and their function/purpose

  • 1 mark

    to make the code easier for other programmers to understand // to make specific parts of the code easier to find

  • 1 mark

    Use of meaningful identifier (names)

  • 1 mark

    for variables / constants / procedures / arrays

  • 1 mark

    so that the purpose is suggested by the identifier / name / so that specific program sections / parts are easier to find / identify

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 (maximum 9 marks)

  • 6 marks

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

Questions

  1. 3
    Question 311 marks
    Mark scheme ›
  2. 4
    Question 410 marks
    Mark scheme ›
  3. 5
    Question 57 marks
    Mark scheme ›
  4. 6
    Question 65 marks
    Mark scheme ›
  5. 7
    Question 78 marks
    Mark scheme ›
  6. 8
    Question 811 marks
    Mark scheme ›
  7. 9
    Question 96 marks
    Mark scheme ›
  8. 10
    Question 1015 marks
    Mark scheme ›

More 0478 papers

Other papers from May/June 2026

Solve it on ExamPalStart