11.1 Programming basics
104 questions in this subtopic. Open a question to solve it and check the official answer.
Programming basics · 4 marks
(i) The sequence of numbers 3, 5, 2, 1 is input and terminated with −1. Complete the trace table. x Result x -1 0 0 Output ........................................................…
Programming basics · 1 mark
(ii) Give the expected result from the sum of the numbers 3, 5, 2, 1. .............................................................................................................…
Programming basics · 1 mark
(iii) What is the error in the given pseudocode? ..................................................................................................................................…
Programming basics · 1 mark
(iv) State the type of error. ...................................................................................................................................... [1]
Programming basics · 3 marks
(b) Rewrite the pseudocode so that it works correctly. ............................................................................................................................…
Programming basics · 4 marks · official answer ready
(i) The sequence of numbers 3, 5, 2, 1 is input and terminated with −1. Complete the trace table. x Result x -1 0 0 Output ........................................................…
Programming basics · 1 mark
(ii) Give the expected result from the sum of the numbers 3, 5, 2, 1. .............................................................................................................…
Programming basics · 1 mark · official answer ready
(iii) What is the error in the given pseudocode? ..................................................................................................................................…
Programming basics · 1 mark · official answer ready
(iv) State the type of error. ...................................................................................................................................... [1]
Programming basics · 4 marks · official answer ready
(i) Write the pseudocode for the procedures InitialiseArrayCounts and InputStudentChoices: PROCEDURE InitialiseArrayCounts ........................................................…
Programming basics · 0 marks
3 Tennis \\\
Programming basics · 3 marks
3 Ahmed runs his own business. He lays floor tiles in rooms for customers. Ahmed wants a program that calculates how many tiles he needs when he inputs the measurements of the len…
Programming basics · 4 marks · official answer ready
(i) Write the pseudocode for the procedures InitialiseArrayCounts and InputStudentChoices: PROCEDURE InitialiseArrayCounts ........................................................…
Programming basics · 0 marks
3 Tennis \\\
Programming basics · 3 marks
3 Ahmed runs his own business. He lays floor tiles in rooms for customers. Ahmed wants a program that calculates how many tiles he needs when he inputs the measurements of the len…
Programming basics · 4 marks · official answer ready
(b) At the design stage, diagrams are used. Describe the function of the following diagrams in the design process. dataflow diagram (DFD) system flowchart [4]
Programming basics · 10 marks · official answer ready
(d) The function CheckAnswerCorrect gives the child three chances to type in the correct answer. The function returns TRUE if the child typed the correct answer, and FALSE if all …
Programming basics · 10 marks · official answer ready
(d) The function CheckAnswerCorrect gives the child three chances to type in the correct answer. The function returns TRUE if the child typed the correct answer, and FALSE if all …
Programming basics · 2 marks · official answer ready
(c) The rules are to be extended to define a rule for a constant identifier. The identifier for a constant follows the same rules as for a variable identifier but always ends with…
Programming basics · 27 marks · official answer ready
(c) In a high-level programming language write code that processes the variable For ResourceID and outputs where the resource is kept. Use a CASE/SELECT Examiner's Use statement. …
