IGCSE Computer Science 0478 Paper 21, Oct/Nov 2024

Question paper and mark scheme75 marks9 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/21 · Oct/Nov 2024

Download PDF
3

Four operators and three types of operator are shown. Draw one or more lines from each operator to its correct operator type. Operator >= AND DIV + Operator type Boolean Arithmetic Logical

[4]
4

Identify three stages of the program development life cycle from the following list of words. analysis decomposition design input pseudocode testing variable 1 ........................................................................... 2 ........................................................................... 3 ...........................................................................

[3]
5

Describe three methods that are used to design and construct a solution to a problem. Method 1 .......................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Method 2 .......................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... Method 3 .......................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[6]
6

An incomplete algorithm has been written in pseudocode to count the number of zeros stored in an array and total the non-zero values. 01 DECLARE A[1:50] : INTEGER 02 DECLARE C : INTEGER 03 DECLARE I : INTEGER 04 DECLARE T : INTEGER 05 I ← 0 06 ........................................................................................................ 07 FOR C ← 1 TO 50 08 IF A[C] .............................................................................. 09 THEN 10 T ← T + 1 11 ELSE 12 I ← I + A[C] 13 ENDIF 14 ........................................................................................................

Figure 1 of 1 for question 6
a

Complete the given pseudocode algorithm.

[3]
b

Write the pseudocode to display, with suitable messages, the number of zeros stored in the array and the total of the non-zero values.

[3]
c

Meaningful identifiers have not been used in the algorithm. Suggest suitable meaningful identifiers for: The array: A .............................................................................................................................................. The variables: T ................................................................................................................................................ C ................................................................................................................................................ I ................................................................................................................................................

[3]
7

Consider the logic circuit:

Figure 1 of 1 for question 7
a

Write a logic expression for the given logic circuit. Do not attempt to simplify the logic expression. W = ...........................................................................................................................................

[3]
b

Complete the truth table from the given logic circuit.

[4]
8

A programmer is designing a program to check the length of a password and to check if the password input is the same as the stored password. The program requirements are: • input the password, Password • check if there are at least 8 characters in the password • check that the password is not the same as the stored password OldPass • output ‘accepted’ if both tests are completed successfully • otherwise, output ‘rejected’. Use the variable names given.

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

Complete the flowchart for the program.

[6]
b

The accepted password, Password, is to be written to the file MyPassword.txt Write pseudocode to: • open the file • write the accepted password to the file • close the file.

[3]
c

Explain why the accepted password needs to be stored in a file.

[2]
9

An algorithm has been written in pseudocode to check if a temperature is in a given range. The temperature values used in the algorithm are correct. 01 REPEAT 02 OUTPUT "Please enter temperature " 03 INPUT Temp 04 IF Temperature = 999 05 THEN 06 IF Temperature > 38.0 07 THEN 08 OUTPUT "Temperature too high" 09 ENDIF 10 IF Temperature < 35.0 11 THEN 12 OUTPUT "Temperature too low" 13 ENDIF 14 IF Temperature >= 35.0 OR Temperature <= 38.0 15 THEN 16 OUTPUT "Temperature normal" 17 ENDIF 18 ENDIF 19 WHILE Temperature = 999

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

Identify the temperature range used.

[2]
c

Complete the trace table for the corrected algorithm using this data: 34.22, 36.1, 37.4, 38.0, 999, –1

[2]
10

A shop that sells cheese has set up a new database table called CheeseStock to store details of the cheeses available for sale. Part of this table is given. ChNo | Name | InStock | SupplierCode | PricePerKg | WeightKg CH01 | American | Yes | XYZ | 4.50 | 20.0 CH02 | Brie | Yes | XYZ | 7.50 | 21.0 CH03 | Burrata | No | IMP | 13.75 | 0.0 CH04 | Camembert | No | ABC | 16.85 | 0.0 CH05 | Cheddar | Yes | ABC | 5.00 | 50.0 CH06 | Comté | No | SPC | 7.35 | 0.0 CH07 | Cottage | Yes | XYZ | 4.50 | 3.0 CH08 | Cream | Yes | XYZ | 5.50 | 6.5 CH12 | Emmental | Yes | IMP | 2.75 | 1.5 CH15 | Feta | Yes | IMP | 12.75 | 12.0 CH16 | Fontina | Yes | SPC | 15.99 | 1.2 CH17 | Gorgonzola | Yes | SPC | 15.25 | 0.3 CH19 | Gouda | Yes | SPC | 7.99 | 2.5 CH21 | Gruyère | No | SPC | 16.75 | 0.0 CH22 | Halloumi | Yes | IMP | 4.75 | 15.0 CH23 | Havarti | No | SPC | 6.75 | 0.0 CH27 | Manchego | No | IMP | 13.99 | 0.0 CH30 | Manouri | No | IMP | 18.50 | 0.0 CH31 | Mascarpone | No | SPC | 12.99 | 0.0

a

State the number of records in this part of the database table.

[1]
b(i)

Give the name of the field that would be used for the primary key.

[1]
b(ii)

State the reason for choosing this field for the primary key.

[1]
c

Write the output from this structured query language (SQL) statement. SELECT ChNo, WeightKg FROM CheeseStock WHERE SupplierCode = 'ABC';

[2]
d(i)

Complete this SQL statement to display only the name of all the cheeses that are out of stock. SELECT ............................................................................................................................. FROM .................................................................................................................. WHERE ............................................................................................................ ;

[3]
d(ii)

Explain how one of the lines in your statement in part (d)(i) could be changed to display the same information.

[2]
11

A running club has 200 members who compete in a 1-kilometre running competition every month. Members’ names are stored in the one-dimensional (1D) array MemberName[] Each member’s time, in seconds, for the 1-kilometre run will be stored in another one-dimensional (1D) array MemberTime[] The position of each member’s data in the two arrays is the same. For example, the member stored at index 10 in MemberName[] and at index 10 in MemberTime[] is the same. The running club awards a small prize to the members who have the top three times. The club also awards certificates to all members with a time under 240 seconds. Write a program that meets the following requirements: • allows members’ times to be input twice and verifies that the inputs match • sorts the arrays MemberTime[] and MemberName[] in ascending order of time • outputs the member names and times of the members with the top three times and identifies them as First, Second and Third • stores the names of all the members who will receive a certificate in the array MemberCertificate[] • outputs a message stating the number of certificates to be printed. You must use pseudocode or program code and add comments to explain how your code works. You do not need to initialise the data in the array MemberName[] 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/21 · Oct/Nov 2024

Download PDF

3 · 4 marks

  • 1 mark

    >= linked to Boolean

  • 1 mark

    AND linked to Logical

  • 1 mark

    DIV linked to Arithmetic

  • 1 mark

    + linked to Arithmetic

4 · 3 marks

  • 1 mark

    analysis

  • 1 mark

    design

  • 1 mark

    testing

5 · 6 marks

  • 1 mark

    structure diagram

  • 1 mark

    structure diagram description: a hierarchical diagram showing the breakdown of a computer program into sub-programs

  • 1 mark

    flowchart

  • 1 mark

    flowchart description: a diagram showing the ordered steps to complete a computer program

  • 1 mark

    pseudocode

  • 1 mark

    pseudocode description: shows what a program does in plain language

6a · 3 marks

  • 1 mark

    06 T ← 0

  • 1 mark

    08 IF A[C] = 0

  • 1 mark

    14 NEXT C // NEXT

6b · 3 marks

  • 1 mark

    outputting T

  • 1 mark

    outputting I

  • 1 mark

    suitable messages

6c · 3 marks

  • 1 mark

    meaningful identifier for the array: A MyArray

  • 1 mark

    2 meaningful identifiers from T Counter, C Index, I Total

  • 1 mark

    3rd meaningful identifier from T Counter, C Index, I Total

7a · 3 marks

  • 1 mark

    NOT X

  • 1 mark

    Y XOR Z

  • 1 mark

    expression correct: NOT X OR (Y XOR Z) // (Y XOR Z) OR NOT X

7b · 4 marks

  • 1 mark

    2/3 correct outputs in column W

  • 1 mark

    4/5 correct outputs in column W

  • 1 mark

    6/7 correct outputs in column W

  • 1 mark

    8 correct outputs in column W

8a · 6 marks

  • 1 mark

    correct use of flowchart symbols

  • 1 mark

    working flowlines

  • 1 mark

    input correct

  • 1 mark

    working length check

  • 1 mark

    working comparison

  • 1 mark

    correct output messages

8b · 3 marks

  • 1 mark

    OPENFILE MyPassword.txt FOR WRITE

  • 1 mark

    WRITEFILE MyPassword.txt, Password

  • 1 mark

    CLOSEFILE MyPassword.txt

8c · 2 marks

  • 1 mark

    needs to be retrieved on demand // saved for a later date

  • 1 mark

    storage must be non-volatile

9a · 4 marks

  • 1 mark

    Line 03 Temp should be Temperature

  • 1 mark

    Line 04 = should be <>

  • 1 mark

    Line 14 OR should be AND

  • 1 mark

    Line 19 WHILE should be UNTIL

9b · 2 marks

  • 1 mark

    greater than or equal to 35

  • 1 mark

    and less than or equal to 38

9c · 2 marks

  • 1 mark

    Temperature column correct (34.22, 36.1, 37.4, 38.0, 999 in correct positions)

  • 1 mark

    OUTPUT column correct (Temperature too low, Temperature normal, Temperature normal, Temperature normal in correct positions)

10a · 1 mark

  • 1 mark

    19

10b(i) · 1 mark

  • 1 mark

    ChNo

10b(ii) · 1 mark

  • 1 mark

    Unique identifier

10c · 2 marks

  • 1 mark

    CH04 0.0

  • 1 mark

    CH05 50.0

10d(i) · 3 marks

  • 1 mark

    SELECT Name

  • 1 mark

    FROM CheeseStock

  • 1 mark

    WHERE NOT InStock // InStock = No / "No" / False // WHERE WeightKg = 0.0;

10d(ii) · 2 marks

  • 1 mark

    WHERE clause can check either the InStock field for FALSE / No / "No" or

  • 1 mark

    the WeightKg field for 0.0

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 (max 9)

  • 6 marks

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

Questions

  1. 3
    Question 34 marks
    Mark scheme ›
  2. 4
    Question 43 marks
    Mark scheme ›
  3. 5
    Question 56 marks
    Mark scheme ›
  4. 6
    Question 69 marks
    Mark scheme ›
  5. 7
    Question 77 marks
    Mark scheme ›
  6. 8
    Question 811 marks
    Mark scheme ›
  7. 9
    Question 98 marks
    Mark scheme ›
  8. 10
    Question 1010 marks
    Mark scheme ›
  9. 11
    Question 1115 marks
    Mark scheme ›

More 0478 papers

Other papers from Oct/Nov 2024

Solve it on ExamPalStart