Computer Science 0478 · 8

Programming

221 questions. Open a question to solve it and check the official answer.

2025 May-June · Paper 21 · Q9(b)

Programming concepts · 6 marks · official answer ready

(b) The function Odds(X) returns ‘Odd’ if the value of X is an odd number and returns ‘Even’ if the value of X is an even number. Write pseudocode statements to: • define the func…

2025 May-June · Paper 21 · Q11

Arrays · 15 marks · official answer ready

11 The one-dimensional (1D) array CompetitorName[] contains the names of 25 competitors in a tournament that includes five events. Another two-dimensional (2D) array CompetitorSco…

2025 May-June · Paper 22 · Q2

Programming concepts · 3 marks · official answer ready

2 A fence measuring 2 metres in height and 20 metres in length needs painting. The area of the fence needs to be calculated so that enough paint for the job is purchased. After th…

2025 May-June · Paper 22 · Q5(b)

Arrays · 2 marks · official answer ready

(b) Write the pseudocode statement that will output the average height rounded to one decimal place. ..............................................................................…

2025 May-June · Paper 22 · Q5(c)

Programming concepts · 4 marks · official answer ready

(c) Explain how you could change the corrected algorithm so that it will also: • find the height of the tallest person. • output the height of the tallest person at the end of the…

2025 May-June · Paper 22 · Q6(b)

Programming concepts · 1 mark · official answer ready

(b) State the purpose of the algorithm on page 6. .................................................................................................................................…

2025 May-June · Paper 22 · Q6(c)

Programming concepts · 3 marks · official answer ready

(c) Explain how the algorithm knows when all the letters in the word have been checked so that it can stop checking. ..............................................................…

2025 May-June · Paper 22 · Q10

Programming concepts · 15 marks

10 A program is required to allow students to calculate the volume of a number of standard three-dimensional shapes. It will use functions to allow other shapes to be added in the…

2025 May-June · Paper 23 · Q2

Programming concepts · 3 marks · official answer ready

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. Use of ari…

2025 May-June · Paper 23 · Q3(b)(i)

Programming concepts · 4 marks · official answer ready

(i) Complete the pseudocode for PROCEDURE Swap PROCEDURE Swap( .........................................................................................................) DECLARE H…

2025 May-June · Paper 23 · Q3(b)(ii)

Programming concepts · 2 marks · official answer ready

(ii) Write the pseudocode to transfer control to PROCEDURE Swap ...................................................................................................................…

2025 May-June · Paper 23 · Q3(c)

Programming concepts · 2 marks · official answer ready

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

2025 May-June · Paper 23 · Q6(b)

Programming concepts · 3 marks · official answer ready

(b) Describe the processes in the algorithm. ......................................................................................................................................…

2025 May-June · Paper 23 · Q8

Arrays · 15 marks · official answer ready

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) ar…

2025 February-March · Paper 12 · Q2(c)(ii)

Programming concepts · 3 marks · official answer ready

(ii) Identify one lossless method of compressing an image. Describe your chosen method. Method ....................................................................................…

2025 February-March · Paper 12 · Q7(c)

Programming concepts · 3 marks · official answer ready

(c) Integrated development environments (IDEs) provide translators. Identify three other common functions of an IDE. 1 ............................................................…

2025 February-March · Paper 22 · Q2

File handling · 1 mark

2 Tick (✓) one box to complete this sentence. The pseudocode to store a hotel name held in the variable Name to a text file is A READFILE Hotels.txt, Name B WRITEFILE Hotels.txt, …

2025 February-March · Paper 22 · Q3

Programming · 4 marks · official answer ready

3 Four development life cycle stages and five descriptions are shown. Draw one line from each stage to the most appropriate description. Not all descriptions will be used. Stage D…

2025 February-March · Paper 22 · Q4(b)(ii)

Programming concepts · 5 marks · official answer ready

(ii) Write the pseudocode for an algorithm to allow a number to be input into an appropriate variable and check whether the number is an integer. If the number is an integer, it i…

2025 February-March · Paper 22 · Q6(b)

Arrays · 2 marks · official answer ready

(b) Write the pseudocode statement to output the average of the numbers, rounded to two decimal places. ...........................................................................…