Programming
221 questions. Open a question to solve it and check the official answer.
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…
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…
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…
Arrays · 2 marks · official answer ready
(b) Write the pseudocode statement that will output the average height rounded to one decimal place. ..............................................................................…
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…
Programming concepts · 1 mark · official answer ready
(b) State the purpose of the algorithm on page 6. .................................................................................................................................…
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. ..............................................................…
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…
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…
Programming concepts · 4 marks · official answer ready
(i) Complete the pseudocode for PROCEDURE Swap PROCEDURE Swap( .........................................................................................................) DECLARE H…
Programming concepts · 2 marks · official answer ready
(ii) Write the pseudocode to transfer control to PROCEDURE Swap ...................................................................................................................…
Programming concepts · 2 marks · official answer ready
(c) Explain the difference between global variables and the variable declared in 3(b)(i). .........................................................................................…
Programming concepts · 3 marks · official answer ready
(b) Describe the processes in the algorithm. ......................................................................................................................................…
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…
Programming concepts · 3 marks · official answer ready
(ii) Identify one lossless method of compressing an image. Describe your chosen method. Method ....................................................................................…
Programming concepts · 3 marks · official answer ready
(c) Integrated development environments (IDEs) provide translators. Identify three other common functions of an IDE. 1 ............................................................…
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, …
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…
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…
Arrays · 2 marks · official answer ready
(b) Write the pseudocode statement to output the average of the numbers, rounded to two decimal places. ...........................................................................…
