IGCSE Computer Science 0478 Paper 23, May/June 2024

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.

Papers open in

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 2024

Download PDF
2
Figure 1 of 2 for question 2
Figure 2 of 2 for question 2
a

Four logic gate symbols and five logic functions are shown. Draw one line to link each logic gate symbol to the appropriate logic function. Not all logic functions will be used.

[4]
b

Complete the truth table for this logic circuit.

[4]
3

Describe the characteristics of the string and char data types and give an example of each. String ................................................................................................................................................ .......................................................................................................................................................... Example ........................................................................................................................................... Char ................................................................................................................................................. .......................................................................................................................................................... Example ...........................................................................................................................................

[4]
4

This pseudocode algorithm is intended to allow data for up to 50 people to be entered and stored in a two-dimensional (2D) array. The data is their last name, first name and the city in which they live. 01 DECLARE People : ARRAY[1:50, 1:3] OF REAL 02 DECLARE Count : INTEGER 03 DECLARE Response : CHAR 04 DECLARE Continue : BOOLEAN 05 FOR I ← 1 TO 50 06 FOR J ← 1 TO 3 07 People[I, J] ← "" 08 NEXT J 09 NEXT I 10 Count ← 100 11 Continue ← TRUE 12 CASE OF 13 OUTPUT "Enter the last name" 14 INPUT People[Count, 1] 15 OUTPUT "Enter the first name" 16 INPUT People[Count, 2] 17 OUTPUT "Enter the city" 18 INPUT People[Count, 3] 19 OUTPUT "Do you want to enter another name (Y or N)?" 20 INPUT Response 21 IF Response = 'N' 22 THEN 23 Continue ← FALSE 24 ELSE 25 Count ← Count + 1 26 ENDIF 27 UNTIL NOT Count

Figure 1 of 1 for question 4
a

Identify the line numbers of the 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

Write the pseudocode that you could add to the end of this algorithm to output the contents of the array. Make sure that the output ends when the data in the array ends.

[4]
c

Explain how you could alter the original corrected algorithm to make sure that the number of elements being added to the array does not exceed the maximum size of the array (50 elements).

[4]
5

The flowchart represents an algorithm.

a

Complete the trace table for the input data: 10, 30, 18, 8, 25, 12, 17, 2, 50, 15, 5

[6]
b

Outline the purpose of the algorithm.

[2]
c

Explain why the identifiers L, S, T and A may not be appropriate to use as identifiers and how they could be improved.

[3]
d

State a more appropriate identifier for each of the variables L, S, T and A

[2]
6

A program is to be written that will accept integers that are between the values of 1 and 80 inclusive.

a

Give examples of normal, abnormal and extreme test data that could be used to make sure the program only accepts valid data. Normal test data ....................................................................................................................... Abnormal test data ................................................................................................................... Extreme test data .....................................................................................................................

[3]
b

Describe what is meant by extreme test data.

[2]
7
a

The string operation SUBSTRING(FullText, X, Y) returns a string from FullText beginning at position X that is Y characters long. The first character in FullText is in position 1. Write the pseudocode statements to: • store the string “IGCSE Computer Science at Cambridge” in FullText • extract and display the words “Computer Science” from the string and store it in a suitable variable • output the original string in upper case.

[4]
b

Write the pseudocode statements to: • store the content of the variable you created in part (a) to a text file named "Subjects.txt" • close the text file at the end of the algorithm.

[3]
8

A database table called Hangar1 stores details of a collection of historic aircraft at a museum.

IDMakeModelYearEnginesAirworthy
JM1Hawker SiddeleyNimrod19664Y
JM2DouglasDC-1019703Y
JM3Aérospatiale-BACConcorde19734N
PB1De HavillandDH-919181Y
PB2HawkerFury19351Y
PB3HawkerNimrod19341Y
PM1FieselerStorch19421N
PM2HawkerHurricane19421Y
PM3SupermarineSpitfire19421N
PM4DouglasC-47 Dakota19422N
PS1Boeing314 Clipper19364N
a

State the number of fields and records in the database table. Fields ........................................................................................................................................ Records ....................................................................................................................................

[2]
b

Give the output that would be produced by the structured query language (SQL) statement: SELECT Model, Year, Engines FROM Hangar1 WHERE Engines > 1 ORDER BY Year;

[4]
c

Complete the SQL statement to display only the ID and model of all the aircraft that are airworthy. SELECT ID, ............................................................................................................................ ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................ ;

[4]
9

A one-dimensional (1D) array Teams[] contains the names of 10 football teams in a local league. A two-dimensional (2D) array Results[] stores, for each team, the total number of: • games won • games drawn • games lost • points. The position of any team’s data is the same in both arrays. For example the data in index 3 of Results[] belongs to the team in index 3 of Teams[] The array data will be used to find the current leader of the league. The variable Played stores the number of games played by each team. Each team plays the same number of games. Write a program that meets the following requirements: • allows the number of games played to be input and stored, with a maximum of 18 games • allows the names of the teams to be input and stored • allows the number of games won, drawn and lost to be input and stored for each team • validates the number of games played and the number of games won, drawn or lost against the number of games played • calculates and stores the number of points for each team using three points for a win and one point for a draw; there are no points for a loss • sorts the array Results[] into descending order of number of points, ensuring the corresponding parallel array Teams[] is kept in the same order • determines how many teams have the highest number of points • outputs the name(s) of the winning team(s) along with the number of points achieved. 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 2024

Download PDF

2a · 4 marks

  • 1 mark

    NAND gate symbol connected to NAND

  • 1 mark

    XOR gate symbol connected to XOR

  • 1 mark

    NOT gate symbol connected to NOT

  • 1 mark

    AND gate symbol connected to AND

2b · 4 marks

  • 4 marks

    Eight correct outputs in Z column (0, 1, 0, 0, 1, 0, 0, 0)

3 · 4 marks

  • 1 mark

    String: A group of characters consisting of letters, numbers and special characters

  • 1 mark

    String example: Cambridge2024

  • 1 mark

    Char: A single character

  • 1 mark

    Char example: X

4a · 4 marks

  • 1 mark

    Line 01 / DECLARE People : ARRAY[1:50, 1:3] OF REAL should be DECLARE People : ARRAY[1:50, 1:3] OF STRING

  • 1 mark

    Line 10 / Count ← 100 should be Count ← 1

  • 1 mark

    Line 12 / CASE OF should be REPEAT

  • 1 mark

    Line 27 / UNTIL NOT Count should be UNTIL NOT Continue // UNTIL Continue = FALSE

4b · 4 marks

  • 1 mark

    Use of appropriate loop

  • 1 mark

    Method to check array maximum not exceeded

  • 1 mark

    Method to check current / next array element not empty

  • 1 mark

    Output of all three array elements per array row (and no more)

4c · 4 marks

  • 1 mark

    Declare/use a variable that is set to the maximum size of the array

  • 1 mark

    … at the start of the program

  • 1 mark

    After line 18

  • 1 mark

    … check that the value of the counting variable is not greater than the array maximum variable

5a · 6 marks

  • 1 mark

    Correct L column

  • 1 mark

    Correct S column

  • 1 mark

    Correct T column

  • 1 mark

    Correct A column

  • 1 mark

    Correct Limit, Count and Value columns

  • 1 mark

    Correct OUTPUT columns

5b · 2 marks

  • 1 mark

    Any two from finds / outputs the largest, smallest, total and average of a set of numbers

  • 1 mark

    All four of finds / outputs the largest, smallest, total and average of a set of numbers

5c · 3 marks

  • 1 mark

    (The identifiers L, S, T and A) are single letters

  • 1 mark

    … so do not give any indication of what values they hold.

  • 1 mark

    For programs to be maintainable, identifiers should have meaningful names.

5d · 2 marks

  • 1 mark

    Two appropriate identifiers from L (Largest / Maximum), S (Smallest / Minimum), T (Total / Sum), A (Average / Mean)

  • 1 mark

    All four appropriate identifiers

6a · 3 marks

  • 1 mark

    Normal test data (e.g. 75)

  • 1 mark

    Abnormal test data (e.g. 101)

  • 1 mark

    Extreme test data (e.g. 80)

6b · 2 marks

  • 1 mark

    Test data to test the limits of acceptable data entry

  • 1 mark

    … that will only accept the largest and smallest acceptable values.

7a · 4 marks

  • 1 mark

    Assignment of given string to FullText

  • 1 mark

    Correct use of SUBSTRING and assignment of reduced string to own variable

  • 1 mark

    Correct use of UCASE

  • 1 mark

    Output of both strings

7b · 3 marks

  • 1 mark

    Opening the correct text file for writing

  • 1 mark

    Writing the variable from part (a) to the file

  • 1 mark

    Closing the text file after writing

8a · 2 marks

  • 1 mark

    Fields – 6

  • 1 mark

    Records – 11

8b · 4 marks

  • 1 mark

    Correct models of planes selected

  • 1 mark

    Correct Years of planes selected

  • 1 mark

    Correct numbers of engines selected with data all matching for each record

  • 1 mark

    Data sorted correctly with no additional fields or punctuation

8c · 4 marks

  • 1 mark

    Correct additional keywords used – FROM, WHERE

  • 1 mark

    Correct SELECT field – Model with no additional fields

  • 1 mark

    Correct table name - Hangar1

  • 1 mark

    Correct search criteria - Airworthy = Y // Airworthy

9 · 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. 2
    Question 28 marks
    Mark scheme ›
  2. 3
    Question 34 marks
    Mark scheme ›
  3. 4
    Question 412 marks
    Mark scheme ›
  4. 5
    Question 513 marks
    Mark scheme ›
  5. 6
    Question 65 marks
    Mark scheme ›
  6. 7
    Question 77 marks
    Mark scheme ›
  7. 8
    Question 810 marks
    Mark scheme ›
  8. 9
    Question 915 marks
    Mark scheme ›

More 0478 papers

Other papers from May/June 2024

Solve it on ExamPalStart