IGCSE Computer Science 0478 Paper 22, May/June 2024

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.

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/22 · May/June 2024

Download PDF
2

Four logic functions and five standard symbols for logic gates are shown. Draw one line to link each logic function to its standard symbol. Not all standard symbols will be used.

[4]
Figure 1 of 2 for question 2
Figure 2 of 2 for question 2
3

Identify three different tasks in the analysis stage of the program development life cycle.

[3]
4

A program needs to make sure the characters input for a product code meet these rules: • The product code is six characters in length. • The first two characters must be "PD". • The last four characters must be a number in the range 1000 to 9999 inclusive.

a

Identify three validation checks and state how each check would make sure the product code met one of these rules.

[6]
b(i)

The program design will include a pseudocode algorithm. Assume that the product code is stored in the variable Product Write the pseudocode to make sure that the product code is six characters in length.

[2]
b(ii)

Write the pseudocode to make sure that the first two characters of the product code are "PD".

[2]
5

A high-level programming language makes use of arithmetic, Boolean and logical operators. State how each type of operator is used. Give an example statement, in pseudocode, for each one.

[6]
6

Totalling and counting are standard methods of solution. Numbers are input. The number 9999.9 is the last number to be input and is ignored.

a

Write an algorithm in pseudocode to total the numbers input and to output the total. You do not need to validate the input.

[4]
b

Write an algorithm in pseudocode to count and output the number of input values that are greater than 100. You do not need to validate the input.

[4]
7

An algorithm has been written in pseudocode to find and display the maximum and minimum values in an array of 1000 positive numbers. The array List[] starts at index 1 01 Max ← List[1] 02 Min ← List[1] 03 FOR Counter ← 2 TO 1000 04 IF List[Counter] < Max 05 THEN 06 Max ← List[Counter] 07 ENDIF 08 IF List[Count] < Min 09 THEN 10 Min ← List[Counter] 11 ENDWHILE 12 NEXT Counter 13 OUTPUT "Maximum value is ", Max 14 OUTPUT "Minimum value is ", Min

a

Give a line number for each of these types of statement: Assignment statement .............................................................................................................. Selection statement .................................................................................................................. Iteration statement ....................................................................................................................

[3]
b

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

[3]
8

A logic circuit is to be built to control the opening of a safe used to store money. There are two keys, A and B, and a time switch C. The safe can only open if both keys are used and the time switch is off. key A: not used 0, used 1 key B: not used 0, used 1 time switch C: switch off 0, switch on 1 safe X: safe cannot open 0, safe can open 1

Figure 1 of 1 for question 8
a

Write the logic expression for this problem.

[3]
b

Complete the truth table for this problem.

[4]
9

This flowchart represents an algorithm.

Figure 1 of 1 for question 9
a

The array List[1:5] used in the flowchart contains this data: List[1]: 15, List[2]: 17, List[3]: 20, List[4]: 5, List[5]: 9 Complete the trace table using the data given in the array.

[5]
b

Describe what the algorithm represented by the flowchart is doing.

[2]
10

A television subscription service has a new database table named Contract to store details of their subscribers’ contracts. The table contains these fields: • ContractNumber – the contract number, for example CT567 • Months – the length of the contract in months, for example 6 • EndDate – the date the contract finishes, for example 30 November 2024 • News – the news service, yes or no • Movie – the movie service, yes or no • Sport – the sports service, yes or no • Junior – the children’s service, yes or no.

a

Identify the field that will be the most appropriate primary key for this table.

[1]
b

Complete the table to identify the most appropriate data type for these fields in Contract

[2]
c

Explain the purpose of these structured query language (SQL) statements. Statement 1: SELECT SUM (Months) FROM Contract; Statement 2: SELECT COUNT (News) FROM Contract WHERE News;

[3]
d

Complete this SQL statement to find the contract numbers of the subscribers that take both the news and sports services. SELECT ..................................................................................................................................... FROM Contract WHERE .......................................................... AND ................................................................. ;

[2]
11

A one-player game uses the two-dimensional (2D) array Grid[] to store the location of a secret cell to be found by the player in 10 moves. Each row and column has 5 cells. At the start of the game: • The program places an ‘X’ in a random cell (not in Grid[1,1]) and empties all the other cells in the grid. • The player starts at the top left of the grid. • The player has 10 moves. During the game: • The player can move left, right, up or down by one cell and the move must be within the grid. • “You Win” is displayed if the player moves to the cell with ‘X’ and has played 10 moves or less. • “You Lose” is displayed if the player has made 10 moves without finding the ‘X’. Write a program that meets these requirements. 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; you may assume that this has already been done. All inputs and outputs must contain suitable messages.

[15]

Mark scheme

0478/22 · May/June 2024

Download PDF

2 · 4 marks

  • 1 mark

    AND connected to AND gate symbol

  • 1 mark

    XOR connected to XOR gate symbol

  • 1 mark

    NAND connected to NAND gate symbol

  • 1 mark

    OR connected to OR gate symbol

3 · 3 marks

  • 1 mark

    abstraction

  • 1 mark

    decomposition

  • 1 mark

    identification of problem

  • 1 mark

    identification of requirements // outline of success criteria

4a · 6 marks

  • 1 mark

    length check …

  • 1 mark

    … to ensure the product code entered is 6 characters in length

  • 1 mark

    format check …

  • 1 mark

    … to ensure the first two characters of the product code entered are “PD”

  • 1 mark

    range check …

  • 1 mark

    … to ensure that the value of the last four figures of the product code entered is between 1000 and 9999

4b(i) · 2 marks

  • 1 mark

    correct use of LENGTH operation

  • 1 mark

    appropriate test

4b(ii) · 2 marks

  • 1 mark

    correct use of SUBSTRING operation

  • 1 mark

    appropriate test

5 · 6 marks

  • 1 mark

    arithmetic – used in calculations

  • 1 mark

    arithmetic example: A ← B + C

  • 1 mark

    Boolean – used for operations with true or false values

  • 1 mark

    Boolean example: IF B AND C

  • 1 mark

    logical – used in comparisons/conditional statements/selection statements

  • 1 mark

    logical example: IF B > C

6a · 4 marks

  • 1 mark

    adding current value to total

  • 1 mark

    input more than one number

  • 1 mark

    setting total to zero before loop

  • 1 mark

    correct use of loop including terminal condition

  • 1 mark

    output total after loop

6b · 4 marks

  • 1 mark

    adding one to counter

  • 1 mark

    correct use of selection, if current value > 100 THEN … ENDIF

  • 1 mark

    input more than one number

  • 1 mark

    setting counter to zero before loop

  • 1 mark

    correct use of loop including terminal condition

  • 1 mark

    output value of counter after loop

7a · 3 marks

  • 1 mark

    01//02//06//10

  • 1 mark

    04(07) and/or 08

  • 1 mark

    03(12)

7b · 3 marks

  • 1 mark

    Line 04 < should be >

  • 1 mark

    Line 08 Count should be Counter

  • 1 mark

    Line 11 ENDWHILE should be ENDIF

8a · 3 marks

  • 1 mark

    X =

  • 1 mark

    (A AND B) // A AND B

  • 1 mark

    AND NOT C

8b · 4 marks

  • 4 marks

    Outputs for X: 0, 0, 0, 0, 0, 0, 1, 0 (4 marks for 8 correct, 3 marks for 6/7 correct, 2 marks for 4/5 correct, 1 mark for 2/3 correct)

9a · 5 marks

  • 1 mark

    column A correct

  • 1 mark

    column B correct

  • 1 mark

    column T correct

  • 2 marks

    columns List[1] to List[5] all entries correct (or 1 mark with one error)

9b · 2 marks

  • 1 mark

    (bubble) sort data in array

  • 1 mark

    in descending order

10a · 1 mark

  • 1 mark

    ContractNumber

10b · 2 marks

  • 1 mark

    First two correct data types

  • 1 mark

    Next two correct data types

10c · 3 marks

  • 1 mark

    to find the total number of months for all contracts

  • 1 mark

    to find the number of contracts

  • 1 mark

    … that are subscribed to News

10d · 2 marks

  • 1 mark

    ContractNumber

  • 1 mark

    News AND Sport // Sport AND News

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 (up to 9 marks according to levels table)

  • 6 marks

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

Questions

  1. 2
    Question 24 marks
    Mark scheme ›
  2. 3
    Question 33 marks
    Mark scheme ›
  3. 4
    Question 410 marks
    Mark scheme ›
  4. 5
    Question 56 marks
    Mark scheme ›
  5. 6
    Question 68 marks
    Mark scheme ›
  6. 7
    Question 76 marks
    Mark scheme ›
  7. 8
    Question 87 marks
    Mark scheme ›
  8. 9
    Question 97 marks
    Mark scheme ›
  9. 10
    Question 108 marks
    Mark scheme ›
  10. 11
    Question 1115 marks
    Mark scheme ›

More 0478 papers

Other papers from May/June 2024

Solve it on ExamPalStart