IGCSE Computer Science 0478 Paper 21, May/June 2023

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/21 · May/June 2023

Download PDF
1
a

Four descriptions of stages in the program development life cycle are shown. Draw one line to link each description to its most appropriate program development life cycle stage. Not all program development life cycle stages will be used.

[4]
b

Identify three of the component parts after a problem has been decomposed. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ...................................................................................................................................................

[3]
3
a

Describe what is meant by data validation.

[2]
b

A validation check is used to make sure that any value that is input is an integer between 30 and 200 inclusive. Give one example of each type of test data to check that the validation check is working as intended. Each example of test data must be different. Give a reason for each of your choices of test data. Normal test data ....................................................................................................................... Reason ..................................................................................................................................... ................................................................................................................................................... Abnormal test data ................................................................................................................... Reason ..................................................................................................................................... ................................................................................................................................................... Extreme test data ..................................................................................................................... Reason ..................................................................................................................................... ...................................................................................................................................................

[6]
4

Explain the purpose of the library routines DIV and ROUND DIV ................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ROUND .............................................................................................................................................. .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[4]
5

An algorithm has been written in pseudocode to allow some numbers to be input. All the positive numbers that are input are totalled and this total is output at the end. An input of 0 stops the algorithm. 01 Exit ← 1 02 WHILE Exit <> 0 DO 03 INPUT Number 04 IF Number < 0 05 THEN 06 Total ← Total + Number 07 ELSE 08 IF Number = 0 09 THEN 10 Exit ← 1 11 ENDIF 12 ENDIF 13 ENDIF 14 OUTPUT "The total value of your numbers is ", Number

a

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

[4]
b

Describe how you could change the corrected algorithm to record and output how many positive numbers have been included in the final total. You do not need to rewrite the algorithm.

[4]
6

State two features that should be included to create a maintainable program. Give a reason why each feature should be used. 1 ....................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... 2 ....................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................

[4]
Figure 1 of 1 for question 6
7

The flowchart represents an algorithm. The table represents the two-dimensional (2D) array Word[] which stores the first half of the phonetic alphabet used for radio transmission. For example, Word[10,1] is 'J'.

Index12
1AAlpha
2BBravo
3CCharlie
4DDelta
5EEcho
6FFoxtrot
7GGolf
8HHotel
9IIndia
10JJuliet
11KKilo
12LLima
13MMike
a

Complete the trace table for the algorithm by using the input data: F, Y, D, N

[4]
b

Identify the type of algorithm used.

[1]
c

Describe one problem that could occur with this algorithm if an invalid character was input.

[2]
8

The function LENGTH(Phrase) calculates the length of a string Phrase

a

Write the pseudocode statements to: • store the string "The beginning is the most important part" in Phrase • calculate and output the length of the string • output the string in upper case.

[3]
b

Write the output your pseudocode should produce.

[2]
9

Consider this logic expression. Z=(NOT A OR B) AND (B XOR C)

a

Draw a logic circuit for this 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]
10

A database table called TVRange shows the main features and prices of a range of televisions.

a

Give the name of the field that is most suitable to be the primary key. State the reason for this choice. Field .......................................................................................................................................... Reason ..................................................................................................................................... ...................................................................................................................................................

[2]
b

The database uses the data types: • text • character • Boolean • integer • real • date/time. Complete the table to show the most appropriate data type for each field. Each data type must be different.

[2]
c

Complete the structured query language (SQL) query to return the television (TV) code, screen size and price of all Smart TVs in the database table. SELECT TVCode, ......................................................., ....................................................... ....................................................... TVRange WHERE SmartTV = .......................................................;

[4]
11

A one-dimensional (1D) array Days[] contains the names of the days of the week. A two-dimensional (2D) array Readings[] is used to store 24 temperature readings, taken once an hour, for each of the seven days of the week. A 1D array AverageTemp[] is used to store the average temperature for each day of the week. The position of any day’s data is the same in all three arrays. For example, if Wednesday is in index 4 of Days[], Wednesday’s temperature readings are in index 4 of Readings[] and Wednesday’s average temperature is in index 4 of AverageTemp[] The temperature readings are in Celsius to one decimal place. Temperatures can only be from –20.0°C to +50.0°C inclusive. Write a program that meets the following requirements: • input and validate the hourly temperatures for one week • calculate and store the average temperature for each day of the week • calculate the average temperature for the whole week • convert all the average temperatures from Celsius to Fahrenheit by using the formula Fahrenheit = Celsius * 9/5 + 32 • output the average temperature in Celsius and in Fahrenheit for each day • output the overall average temperature in Celsius and in Fahrenheit for the whole week. 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. All data output must be rounded to one decimal place. You will need to initialise and populate the array Days[] at the start of the program.

[15]

Mark scheme

0478/21 · May/June 2023

Download PDF

1a · 4 marks

  • 1 mark

    develop an algorithm to solve the problem using structure diagrams, flowcharts or pseudocode connects to design

  • 1 mark

    detect and fix the errors in the program connects to testing

  • 1 mark

    identify the problem and its requirements connects to analysis

  • 1 mark

    write and implement the instructions to solve the problem connects to coding

1b · 3 marks

  • 1 mark

    inputs // what is put into the system

  • 1 mark

    processes // actions taken to achieve a result

  • 1 mark

    outputs // what is taken out of the system

3a · 2 marks

  • 1 mark

    Validation is an automated check carried out by a computer

  • 1 mark

    … to make sure the data entered is sensible/acceptable/reasonable

3b · 6 marks

  • 1 mark

    Normal test data: 75

  • 1 mark

    Normal reason: the data lies within the required range and should be accepted

  • 1 mark

    Abnormal test data: Sixty

  • 1 mark

    Abnormal reason: this is the wrong data type and should be rejected

  • 1 mark

    Extreme test data: 200

  • 1 mark

    Extreme reason: the highest value in the required range that should be accepted

4 · 4 marks

  • 1 mark

    DIV: To perform integer division

  • 1 mark

    DIV: Meaning only the whole number part of the answer is retained

  • 1 mark

    ROUND: To return a value rounded to a specified number of digits / decimal places

  • 1 mark

    ROUND: The result will either be rounded to the next highest or the next lowest value / … depending on whether the value of the preceding digit is >=5 or <5 / Example of ROUND for example, ROUND(4.56, 1) = 4.6

5a · 4 marks

  • 1 mark

    Line 04 / IF Number < 0 should be IF Number > 0

  • 1 mark

    Line 10 / Exit ← 1 // Line 01/ Exit ← 1 and Line 02 / WHILE Exit <> 0 should be Exit ← 0 // should be Exit ← 0 and WHILE Exit = 0

  • 1 mark

    Line 13 / ENDIF should be ENDWHILE

  • 1 mark

    Line 14 / OUTPUT "The total value of your numbers is ", Number should be OUTPUT "The total value of your numbers is ", Total

5b · 4 marks

  • 1 mark

    Initialise a new (counting) variable

  • 1 mark

    … Count ← 0 // to count the acceptable numbers

  • 1 mark

    Insert a counting statement between lines 05 and 07 / … Count ← Count + 1

  • 1 mark

    Add a new output after the loop/after line 13 / at the end (of the program) / … OUTPUT Count

6 · 4 marks

  • 1 mark

    Feature 1: Meaningful identifiers / Use of comments / Procedures and functions

  • 1 mark

    Reason 1 accompanying Feature 1

  • 1 mark

    Feature 2: Meaningful identifiers / Use of comments / Procedures and functions

  • 1 mark

    Reason 2 accompanying Feature 2

7a · 4 marks

  • 1 mark

    Pointer column correct

  • 1 mark

    Letter column correct

  • 1 mark

    Choice column correct

  • 1 mark

    OUTPUT column correct

7b · 1 mark

  • 1 mark

    (Linear) search

7c · 2 marks

  • 1 mark

    The algorithm would not stop / The array would run out of values after the pointer reached 13

  • 1 mark

    … because it would not have found the item it was seeking / the algorithm will crash

8a · 3 marks

  • 1 mark

    Storing string in Phrase

  • 1 mark

    Correct use of LENGTH function

  • 1 mark

    Correct use of UCASE function / Correct outputs of LENGTH and UCASE

8b · 2 marks

  • 1 mark

    40

  • 1 mark

    THE BEGINNING IS THE MOST IMPORTANT PART

9a · 4 marks

  • 1 mark

    NOT gate with input A

  • 1 mark

    OR gate with inputs NOT A and B

  • 1 mark

    XOR gate with inputs B and C

  • 1 mark

    AND gate with inputs from OR and XOR gates

9b · 4 marks

  • 4 marks

    Eight correct outputs in truth table (Z column: 0, 1, 1, 0, 0, 0, 1, 0)

10a · 2 marks

  • 1 mark

    TVCode

  • 1 mark

    Each entry in this field is a unique identifier

10b · 2 marks

  • 2 marks

    Four correct data types (TVCode: Text, ScreenSize: Integer, SmartTV: Boolean, Price$: Real)

10c · 4 marks

  • 1 mark

    ScreenSize

  • 1 mark

    Price$

  • 1 mark

    FROM

  • 1 mark

    YES

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 marks)

  • 6 marks

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

Questions

  1. 1
    Question 17 marks
    Mark scheme ›
  2. 3
    Question 38 marks
    Mark scheme ›
  3. 4
    Question 44 marks
    Mark scheme ›
  4. 5
    Question 58 marks
    Mark scheme ›
  5. 6
    Question 64 marks
    Mark scheme ›
  6. 7
    Question 77 marks
    Mark scheme ›
  7. 8
    Question 85 marks
    Mark scheme ›
  8. 9
    Question 98 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 2023

Solve it on ExamPalStart