Programming
471 questions. Open a question to solve it and check the official answer.
Constructs · 4 marks · official answer ready
(b) Consider each incident you have identified as ethical behaviour. Draw a line from each incident to indicate the IEEE category it maps to. [4] 10
Programming basics · 3 marks · official answer ready
(i) Name three components of a speaker. 1 ........................................................................................................................................ …
Constructs · 3 marks · official answer ready
(e) Write an SQL script to display the date and time of all appointments made by the patient with the PatientID of 556. ...........................................................…
Constructs · 4 marks · official answer ready
(c) The following pseudocode is an example of nested IF statements. IF MyVar = 1 THEN CALL Proc1() ELSE IF MyVar = 2 THEN CALL Proc2() ELSE IF MyVar = 3 THEN CALL Proc3() ELSE OUT…
Programming basics · 2 marks · official answer ready
(iii) An experienced programmer is presented with program code in an unfamiliar high-level language. State two features of the code that the programmer should be able to recognise…
Constructs · 2 marks · official answer ready
(i) Describe what will happen if the pseudocode is tested when MyMark has the following values: 27 ................................................................................…
Constructs · 5 marks · official answer ready
(ii) Use pseudocode to write an IF statement with the same functionality. .........................................................................................................…
Structured programming · 0 marks
4 Programming languages provide built-in functions to generate random numbers. To be truly random, the frequency of each number generated should be the same. You are required to w…
Programming basics · 11 marks
10 22 2 11 (c) The procedure is developed and run using the call TestRandom(200). No system errors are produced. To ensure that the procedure works correctly, you need to check th…
Constructs · 4 marks · official answer ready
(c) The following pseudocode is an example of nested IF statements. IF MyVar = 1 THEN CALL Proc1() ELSE IF MyVar = 2 THEN CALL Proc2() ELSE IF MyVar = 3 THEN CALL Proc3() ELSE OUT…
Programming basics · 6 marks · official answer ready
(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. has been done for you. ::= .................................................................................…
Constructs · 3 marks · official answer ready
(iii) The code beginning at the instruction labelled HEATON must make the system turn on the heaters in those areas that are below the minimum temperature. Describe what this code…
Programming basics · 6 marks · official answer ready
(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. has been done for you. ::= .................................................................................…
Constructs · 3 marks · official answer ready
(iii) The code beginning at the instruction labelled HEATON must make the system turn on the heaters in those areas that are below the minimum temperature. Describe what this code…
Constructs · 7 marks · official answer ready
1 A greenhouse has a window that automatically opens and closes depending on the internal temperature. If the temperature rises above 20 °C, the window half opens. If the temperat…
Constructs · 11 marks · official answer ready
(a) A program stores a letter. The user is allowed nine attempts to guess the stored letter. The program outputs “?” and the user guesses a letter. If the user guesses the letter,…
Constructs · 0 marks · official answer ready
(b) Five numbers are stored, starting in the location labelled NUMBERS. A program is needed to multiply each of the numbers by 4 and store them back in their original location. Wr…
Constructs · 3 marks · official answer ready
(c) Show how the columns from part (a) were simplified to create the columns in part (b). For example, if columns 5, 6 and 7 were simplified to create column X, then you state thi…
Constructs · 7 marks · official answer ready
1 A greenhouse has a window that automatically opens and closes depending on the internal temperature. If the temperature rises above 20 °C, the window half opens. If the temperat…
Constructs · 11 marks · official answer ready
(a) A program stores a letter. The user is allowed nine attempts to guess the stored letter. The program outputs “?” and the user guesses a letter. If the user guesses the letter,…
