Programming
471 questions. Open a question to solve it and check the official answer.
Constructs · 2 marks · official answer ready
(ii) The database administrator needs to alter the USER table. A new field, Country, needs to be added. Write an SQL script to add the field Country to the USER table. ...........…
Programming basics · 4 marks · official answer ready
3 A computer is designed using the Von Neumann model. (a) Describe the role of the Arithmetic and Logic Unit (ALU) and Control Unit (CU) in the Von Neumann model. ALU ............…
Constructs · 2 marks
7 A zoo has a computer system for the visitors to access multimedia content about the zoo and its animals. (d) This computer system has Random Access Memory (RAM) and Read Only Me…
Structured programming · 9 marks · official answer ready
(b) Study the function StringClean(). Identify the features of the function in the following table. Feature Answer A line number containing an example of an assignment statement A…
Programming basics · 8 marks · official answer ready
3 In a chemical factory, a procedure, CheckSensor() is required to allow an operator to monitor the temperature in different locations. In the factory: • the temperature is measur…
Constructs · 9 marks · official answer ready
4 (a) A structure chart is used in modular program design. Iteration and selection are two features of an algorithm that may be shown on a structure chart. Give three other featur…
Constructs · 2 marks · official answer ready
(b) Editing functions such as cut, copy and paste are features provided by an Integrated Development Environment (IDE). Give two additional features of an IDE that are helpful whe…
Constructs · 9 marks · official answer ready
(c) The information is stored in a text file, ScoreDetails.txt. The format of each line of the text file is as follows: • MembershipNumber is a four-digit numeric string. • Date i…
Constructs · 5 marks · official answer ready
(i) Program variables have values as follows: Variable Value Mark 60 Subject "Computer Science" Grade 'B' CourseCompleted TRUE AverageMark 49.5 Evaluate each expression in the fol…
Programming · 5 marks · official answer ready
(ii) Programming languages support different data types. Give an appropriate data type for each of these variables from part (b)(i). Variable Data type Mark Subject Grade CourseCo…
Constructs · 2 marks · official answer ready
(i) This pseudocode includes features that make it easier to read and understand. State two such features. Feature 1 ..............................................................…
Constructs · 2 marks · official answer ready
(ii) State two additional features that should be used to make this pseudocode easier to read and understand. Feature 1 ...........................................................…
Structured programming · 8 marks · official answer ready
(b) Study the function CountDigits(). Identify the features of the function in the following table. Feature Answer A line number containing an example of an assignment statement A…
Constructs · 2 marks · official answer ready
(i) There is a mistake in the pseudocode that would produce a data type mismatch error if a programmer were to write similar program code. Describe this mistake and how it may be …
Constructs · 4 marks · official answer ready
(ii) Lines 17 to 22 of the pseudocode could be written in a simplified form. Re-write the lines in a simplified form. .............................................................…
Structured programming · 2 marks · official answer ready
(b) A procedure, AddNewScores() is being developed. The procedure will be coded using an Integrated Development Environment (IDE). Name two features provided by an IDE that assist…
Constructs · 4 marks · official answer ready
(c) The program needs a function, GetNumber(), to return a valid membership number. A valid membership number is a four-digit numeric string between “1111” and “9999”. The structu…
Constructs · 5 marks · official answer ready
(i) Program variables have values as follows: Variable Value Quality 'D' DayNumber 20 MyName "Stephen" QualityConfirmed TRUE Factor 6.5 Evaluate each expression in the following t…
Programming · 5 marks · official answer ready
(ii) Programming languages support different data types. Give an appropriate data type for each of these variables from part (b)(i). Variable Data type QualityConfirmed DayNumber …
Constructs · 2 marks · official answer ready
(a) This pseudocode includes features that are examples of good practice. Explain why it is useful to include the two following features. Comments ................................…
