Programming
221 questions. Open a question to solve it and check the official answer.
Programming concepts · 3 marks · official answer ready
(b) Describe the processes in the algorithm on page 6. ............................................................................................................................…
Arrays · 4 marks · official answer ready
(c) The algorithm on page 6 requires the array CodeStore[] to be declared as a one‑dimensional (1D) string array with six elements that are initially set to the null string "". Wr…
Arrays · 15 marks · official answer ready
8 A program is required to test the fairness of the random number generator. The one‑dimensional (1D) array RandomNumber[] is used to store 100 000 random integers. The two‑dimens…
Programming concepts · 4 marks · official answer ready
2 Four descriptions of programming techniques and five programming techniques are given. Draw one line from each description to the relevant technique. Not all techniques will be …
Programming concepts · 1 mark · official answer ready
3 Tick (3) one box to identify the most appropriate data type to store 'M' A integer B char C real D Boolean [1] * 0000800000003 * DFD 3 , ,
Programming concepts · 4 marks · official answer ready
4 (a) Tickets for a theme park are booked online. An adult ticket costs $12.99 and a child ticket costs $7.99. A booking fee of $1.99 is added to the total cost of each booking. W…
Programming concepts · 4 marks · official answer ready
(b) Each booking must have at least one adult ticket. Explain how the algorithm could be changed to repeatedly ask for the number of adult tickets if the number input is less than…
Programming concepts · 2 marks · official answer ready
(b) The algorithm does not work correctly. State the reason why the algorithm does not work as expected and explain how the algorithm could be corrected. Any code used must be ful…
Programming concepts · 3 marks · official answer ready
(a) Write pseudocode statements to declare the variables Name, Age and Found ......................................................................................................…
Programming concepts · 5 marks · official answer ready
(i) Write pseudocode statements to: • define the procedure with the parameter • store the name of the person in the file. .........................................................…
Programming concepts · 2 marks · official answer ready
(ii) Write the pseudocode that uses the procedure StoreData() to store the name ‘Suella’ in the file People.txt ...................................................................…
Arrays · 15 marks · official answer ready
10 A number game has two players. Random whole numbers are generated for each player. The numbers are compared and players are given points based on the result of the comparison. …
Programming concepts · 1 mark
(a) The image file was taken by a digital camera. Tick (✓) one box to show whether a digital camera is an example of an input, output, process or storage device. A input B output …
Programming concepts · 4 marks · official answer ready
(ii) Give two other functions commonly found in an IDE. State the role of each function. Function 1 ...............................................................................…
Programming concepts · 6 marks · official answer ready
(ii) A patient is making a payment through a secure connection. The secure connection is created using the secure socket layer (SSL) protocol. Explain how a secure connection is c…
Arrays · 4 marks · official answer ready
3 The following pseudocode algorithm uses a count-controlled loop to read in 10 names and store them in the array Names[] FOR Count 1 TO 10 OUTPUT "Please enter a name" INPUT Name…
Programming concepts · 5 marks · official answer ready
(a) Write an algorithm using pseudocode to: • input the telephone number • extract the 2-digit country code • output the matching country • output ‘Unknown’ if there is no matchin…
Programming concepts · 3 marks · official answer ready
(b) Explain how you could change the algorithm to repeatedly prompt for the telephone number until the number entered is 13 characters in length. Any code used must be fully expla…
Programming concepts · 4 marks · official answer ready
5 Two library routines used in programming are MOD and DIV. State the purpose of each of the library routines. Give one example pseudocode statement for each of the library routin…
Programming concepts · 2 marks · official answer ready
(a) Write pseudocode statements to declare the variables A and B ..................................................................................................................…
