8.1 Programming concepts
171 questions in this subtopic. Open a question to solve it and check the official answer.
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. ......................................................................................................................................…
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 ............................................................…
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…
Programming concepts · 4 marks · official answer ready
(c) Explain how you could change the corrected algorithm so that it also finds the smallest number that was input and outputs its value at the end. Any code used must be fully exp…
Programming concepts · 3 marks · official answer ready
(i) Explain how you would change the algorithm to prevent the problems described. .................................................................................................…
Programming concepts · 1 mark · official answer ready
(c) The washing machine needs to display error codes on a small screen if there is a problem with the washing machine. The error codes are stored as binary. The binary numbers are…
Programming concepts · 2 marks · official answer ready
(b) Give two benefits of compressing the report file before emailing it. 1 ........................................................................................................…
Programming concepts · 4 marks · official answer ready
3 Four operators and three types of operator are shown. Draw one or more lines from each operator to its correct operator type. Operator Operator type >= Boolean AND Arithmetic DI…
Programming concepts · 3 marks · official answer ready
(c) Meaningful identifiers have not been used in the algorithm. Suggest suitable meaningful identifiers for: The array: A .........................................................…
Programming concepts · 3 marks · official answer ready
(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. .…
Programming concepts · 2 marks · official answer ready
(c) Explain why the accepted password needs to be stored in a file. ...............................................................................................................…
Programming concepts · 0 marks · official answer ready
11 THEN
Programming concepts · 4 marks
(a) Identify the line numbers of four errors in the pseudocode and suggest a correction for each error. Error 1 line number .......................................................…
Programming concepts · 1 mark · official answer ready
2 Tick (✓) one box to complete this sentence. A pseudocode example of a selection statement is A CALL Sorting(Value1, Value2) B DECLARE Count : INTEGER C IF X = 7 THEN Y 21 ENDIF …
