IGCSE Computer Science 0478 Paper 23, May/June 2025

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 2025

Download PDF
1

The flowchart shows an algorithm used for quality control on a biscuit production line. The weight of each biscuit is entered into the variable Weight. If the weight of the biscuit is between 16.2 and 17.2 grammes, inclusive, the pass counter is incremented by 1. Otherwise, the reject counter is incremented by 1. The process continues until –1 is entered, after which, the totals for pass and reject counters are output.

Figure 1 of 2 for question 1
Figure 2 of 2 for question 1
a

Complete this flowchart.

[6]
b

Explain how you would alter the flowchart in 1(a) so that it calculates and outputs the average weight of only the biscuits that passed the weight check. You may include program statements or flowchart symbols in your answer, but they must be fully explained.

[4]
2

Three uses of arithmetic operators and four results are shown. Draw one line from each use of arithmetic operator to the correct result. Not all results will be used.

[3]
3

The purpose of this pseudocode algorithm is to carry out a bubble sort to sort, in descending order, 1000 numbers stored in a one-dimensional (1D) array. 01 DECLARE Values : ARRAY[1:1000] OF REAL 02 DECLARE Index : CHAR 03 DECLARE Stop : BOOLEAN 04 DECLARE Hold : REAL 05 Stop ← FALSE 06 WHILE NOT Stop DO 07 Stop ← FALSE 08 FOR Index ← 1 TO 50 09 IF Values[Index + 1] > Values[Index] 10 THEN 11 Hold ← Values[Index] 12 Values[Index] ← Values[Index + 1] 13 Values[Index + 1] ← Hold 14 Stop ← FALSE 15 ENDIF 16 NEXT Index 17 NEXT Stop

a

Identify the line numbers of four errors in the pseudocode and suggest a correction for each error. Error 1 line number ............................... Correction ................................................................................................................................. ................................................................................................................................................... Error 2 line number ............................... Correction ................................................................................................................................. ................................................................................................................................................... Error 3 line number ............................... Correction ................................................................................................................................. ................................................................................................................................................... Error 4 line number ............................... Correction ................................................................................................................................. ...................................................................................................................................................

[4]
b(i)

The swap section in lines 11 to 13 of the existing code are to be changed to a call statement for a procedure. This procedure will include two parameters representing the indexes of the array elements to be swapped. Complete the pseudocode for PROCEDURE Swap PROCEDURE Swap(.........................................................................................................) DECLARE Hold : REAL Hold ← Values[ .................................................................................................] ................................................................................................................................... ................................................................................................................................... ENDPROCEDURE

[4]
b(ii)

Write the pseudocode to transfer control to PROCEDURE Swap

[2]
c

Explain the difference between global variables and the variable declared in 3(b)(i).

[2]
4
a(i)

An input must be an integer between 10 and 95, inclusive. State the type of validation check to test if the input meets this requirement.

[1]
a(ii)

Suggest suitable abnormal and extreme test data for an integer between 10 and 95 inclusive, and give a reason for each of your choices. Abnormal test data ............................................................................................................ Reason .............................................................................................................................. ........................................................................................................................................... Extreme test data .............................................................................................................. Reason .............................................................................................................................. ...........................................................................................................................................

[4]
b(i)

A password system requires all new passwords to contain at least 12 characters. State the type of validation check to test that the password meets this requirement.

[1]
b(ii)

Write the pseudocode to allow a new password to be entered and to ensure that it contains at least 12 characters. The password is re-input until it meets this requirement. Use an appropriate error message for inputs that do not meet the requirement. You do not need to declare any variables for this algorithm.

[5]
5
a

A computer store uses a database table COMPONENT to store the stock details of a range of components needed to build computer systems. Complete the table by giving appropriate data types for each field. Only the data types: text, character, Boolean, integer, real, date/time are available in this database.

[4]
b

Complete the structured query language (SQL) statement to list only the unique identifier, component name and reorder date of all the components that have been reordered. SELECT ........................................................................................................ FROM ................................................................ WHERE .......................................................................................................... ;

[4]
6

This pseudocode represents an algorithm. DECLARE Store : ARRAY[1:100] OF CHAR DECLARE Word : STRING DECLARE Index : INTEGER DECLARE Letter : CHAR INPUT Word FOR Index ← 1 TO LENGTH(Word) Letter ← SUBSTRING(Word, Index, 1) CASE OF Letter 'A' : Letter ← "" 'E' : Letter ← "" 'I' : Letter ← "" 'O' : Letter ← "" 'U' : Letter ← "" ENDCASE Store[Index] ← Letter NEXT Index FOR Index ← 1 TO LENGTH(Word) IF Store[Index] <> "" THEN OUTPUT Store[Index] ENDIF NEXT Index

a

Complete the trace table for the algorithm, using input data: COMPUTER

[5]
b

Describe the processes in the algorithm.

[3]
7
a

Draw the symbol for a NOR logic gate and complete the truth table for it.

[2]
b(i)

Consider the rules given in the following table: Input | Binary value | Description L | 0 | dark | 1 | light M | 0 | no motion detected | 1 | motion detected S | 0 | no sound detected | 1 | sound detected A security system uses sensors to sound an alarm if an intruder is detected. The alarm sounding is represented by the output A = 1. The alarm sounds if it is dark and if either motion or sound or both motion and sound are detected. Write the logic expression for the security system. A = .....................................................................................................................................

[2]
b(ii)

Complete the truth table for the security system.

[4]
8

A collector needs a video library system for a collection of videos stored on 4K Blu-ray discs, standard Blu-ray discs, DVD, or as digital downloads. The two-dimensional (2D) array Video[] is used to store, for each video item, the title, the format of the video (4K Blu-ray disc, standard Blu-ray disc, DVD, or digital download), the year it was released stored as a string and a storage code to represent where the video can be found in the collection, for example: Video[1,1] is "Macbeth" Video[1,2] is "digital download" Video[1,3] is "2015" Video[1,4] is "DG276" The two-dimensional (2D) array Results[] is used to store the results of a search to find a specific video. The search uses the video title, and if the video is found, its data is copied from the array Video[] to the array Results[]. The search continues and if other videos with the same title are found, this data is also copied to the array Results[]. The search ends when the end of the data is reached. Write a program that meets the following requirements: • The video library array needs to be initialised with the null string (""), allowing for up to 10000 records. The array Results[] must be initialised before every search with the null string and must be able to hold up to 20 search results with the same title. • Create a menu to add a new video to the library to search for an existing video by title, or to stop, with validation of the input. • When the user enters a new video, the following data is stored in the first available location of the relevant array: o video title o format (4K Blu-ray disc, standard Blu-ray disc, DVD, digital download) o year of release as string o storage code. • Allow input of data for another video if required. • When searching for an existing video, if a match is found, transfer all the data for that video into the array Results[], and continue to search until all videos with the same title have been found. • Output the results from the array Results[] • If the video title is not found, output a suitable message. • The system returns to the menu after completing the input or the output, until the user chooses to stop. You must use pseudocode or program code and add comments to explain how your code works. You do not need to declare any arrays, variables or constants. You may assume that this has already been done. All inputs and outputs must contain suitable messages.

[15]

Mark scheme

0478/23 · May/June 2025

Download PDF

1a · 6 marks

  • 1 mark

    input Weight

  • 1 mark

    correct check for Weight = -1

  • 1 mark

    correct check for Weight between 16.2 and 17.2 inclusive

  • 1 mark

    correct increment for PassCount

  • 1 mark

    correct increment for RejectCount

  • 1 mark

    output PassCount and RejectCount

1b · 4 marks

  • 1 mark

    Initialise a new variable at the start of the flowchart to total the biscuit weights.

  • 1 mark

    Near the point where PassCount is incremented/after the yes for the weight decision box, add a new process (box)

  • 1 mark

    … to add the weight of the current biscuit to the running total weight.

  • 1 mark

    Outside the loop, calculate the average weight as total weight divided by number of biscuits that passed (PassCount)

  • 1 mark

    Output the average weight, outside the loop.

2 · 3 marks

  • 1 mark

    355 DIV 10 matched to 35

  • 1 mark

    355 / 10 matched to 35.5

  • 1 mark

    355 MOD 10 matched to 5

3a · 4 marks

  • 1 mark

    Line 02 / DECLARE Index : CHAR should be DECLARE Index : INTEGER

  • 1 mark

    Line 07 / Stop  FALSE should be Stop  TRUE

  • 1 mark

    Line 08 / FOR Index  1 TO 50 should be FOR Index  1 TO 999 // FOR Index  1 TO 1000 - 1

  • 1 mark

    Line 17 / NEXT Stop should be ENDWHILE

3b(i) · 4 marks

  • 1 mark

    Two integer parameters in PROCEDURE line

  • 1 mark

    Correct index assigned to Hold  Values[Index1]

  • 1 mark

    Array element correctly assigned to new array element (Index2 to Index1)

  • 1 mark

    Value in Hold assigned to correct array element (Index2).

3b(ii) · 2 marks

  • 1 mark

    Correct call command and use of Swap for procedure name

  • 1 mark

    Two parameters referring to the correct indices of array elements to be swapped, as shown in the original algorithm. Index + 1 and Index.

3c · 2 marks

  • 1 mark

    Global variables can be used throughout the program and its procedures // The memory used by the variables is not recovered until the program terminates.

  • 1 mark

    The variable declared in part 3(b)(i) is a local variable and can only be used in that procedure // The memory used by a local variable is recovered at the end of the procedure.

4a(i) · 1 mark

  • 1 mark

    Range (check)

4a(ii) · 4 marks

  • 1 mark

    Abnormal test data: 150 (any non-integer or any value outside the range 10 and 95)

  • 1 mark

    Reason: This data is out of range so should be rejected

  • 1 mark

    Extreme test data: 10 // 95

  • 1 mark

    Reason: This is the smallest data entry that will be accepted // This is the largest data entry that will be accepted.

4b(i) · 1 mark

  • 1 mark

    Length (check)

4b(ii) · 5 marks

  • 1 mark

    Appropriate condition-controlled loop

  • 1 mark

    Password input to a variable

  • 1 mark

    Use of LENGTH function to find password length

  • 1 mark

    Selection statement to check password length is at least 12

  • 1 mark

    Error message if length incorrect inside loop

  • 1 mark

    Correct loop termination for password of correct length.

5a · 4 marks

  • 4 marks

    Eight data types correct (4 marks for all 8; 3 marks for 6-7; 2 marks for 4-5; 1 mark for 2-3)

5b · 4 marks

  • 1 mark

    All correct fields in SELECT in any order

  • 1 mark

    Correct table name in FROM: COMPONENT

  • 1 mark

    Correct field in WHERE: ReOrdered (=)

  • 1 mark

    Correct criterion in WHERE: (=) TRUE

6a · 5 marks

  • 1 mark

    Correct Word and Letter columns

  • 1 mark

    Correct Index column

  • 1 mark

    Correct Store(1, 3, 4, 6, 8) columns (consonants)

  • 1 mark

    Correct Store(2, 5, 7) columns (vowels)

  • 1 mark

    Correct OUTPUT Column

6b · 3 marks

  • 1 mark

    Each letter of a word is checked to see if it is A, E, I, O or U / a vowel

  • 1 mark

    Vowels are changed to the null string using a case statement

  • 1 mark

    Each letter or null string is individually stored in an array

  • 1 mark

    All consonants are output.

7a · 2 marks

  • 1 mark

    NOR Logic gate symbol

  • 1 mark

    Truth table correctly completed

7b(i) · 2 marks

  • 1 mark

    NOT L AND

  • 1 mark

    (M OR S) / (M OR S) OR NOT L AND M AND S / (M OR S OR (M AND S))

7b(ii) · 4 marks

  • 4 marks

    Outputs for truth table (4 marks for 8 correct, 3 marks for 6-7, 2 marks for 4-5, 1 mark for 2-3)

8 · 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 (up to 9 marks based on marking grid)

  • 6 marks

    AO3: Provide solutions to problems by evaluating computer systems, making reasoned judgements, presenting conclusions (up to 6 marks based on marking grid)

Questions

  1. 1
    Question 110 marks
    Mark scheme ›
  2. 2
    Question 23 marks
    Mark scheme ›
  3. 3
    Question 312 marks
    Mark scheme ›
  4. 4
    Question 411 marks
    Mark scheme ›
  5. 5
    Question 58 marks
    Mark scheme ›
  6. 6
    Question 68 marks
    Mark scheme ›
  7. 7
    Question 78 marks
    Mark scheme ›
  8. 8
    Question 815 marks
    Mark scheme ›

More 0478 papers

Other papers from May/June 2025

Solve it on ExamPalStart