Programming
468 questions. Open a question to solve it and check the official answer.
Programming basics · 4 marks · official answer ready
1 A programmer is developing an expert system. The expert system will diagnose problems in car engines. Describe four stages in the development of the expert system. 1 ...........…
Programming basics · 4 marks · official answer ready
7 (a) Complete the truth table for the following logic circuit. A B X C INPUT Workspace OUTPUT A B C X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 [4] 11
Constructs · 4 marks · official answer ready
(b) The factory stores cars in a 30-level warehouse that has separate storage areas, known as pods. A computer-controlled forklift system removes a car from its pod. Each pod has …
Constructs · 4 marks · official answer ready
2 (a) A processor controls a heating system. To do this, it uses: • a temperature sensor • a device in which a small electrical input current switches a much larger current for th…
Constructs · 2 marks · official answer ready
(i) Intruder detection system Sensor ............................................................................................................................... Reason for cho…
Constructs · 2 marks · official answer ready
(ii) Switching on a street lamp when it gets dark. Sensor .........................................................................................................................…
Constructs · 2 marks · official answer ready
(iii) Counting people entering a building. Sensor ............................................................................................................................... R…
Programming basics · 4 marks · official answer ready
5 (a) Complete the truth table for the following logic circuit. A B X C INPUT Workspace OUTPUT A B C X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 [4] 11
Constructs · 3 marks · official answer ready
(iii) When the driver parked the car, the computer system stored the registration plate data in the appropriate element of the ParkingArea array. When paying the parking fee, the …
Constructs · 8 marks
8 ........................................................................................................................................... [4] (d) The car park has ten levels. …
Programming basics · 4 marks · official answer ready
4 (a) Complete the truth table for the following logic circuit. A X B C INPUT Workspace OUTPUT A B C X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 [4]
Constructs · 1 mark
(e) “A command line interface (CLI) uses icons to represent applications that are launched by a click of the mouse button.” .......................................................…
Constructs · 7 marks · official answer ready
(i) Rewrite the procedure PrintNameLine. Your solution should allow for the case when the name has an odd number of characters. Programming language ..............................…
Constructs · 2 marks · official answer ready
(ii) Describe what happens when a name consists of 18 or more characters. .........................................................................................................…
Programming basics · 3 marks · official answer ready
(e) The pseudocode Zara wrote in part (c) has some features that make it easier to read and understand. State three such features. 1 ..............................................…
Constructs · 0 marks
3 City Centre
Constructs · 10 marks
(c) Use the flowchart opposite to write program code for the procedure TicketCalculator. Programming language .....................................................................…
Constructs · 10 marks
5 [4] 8 (e) At the end of the day, the computer is shut down. Before the program stops, the array data from TableBookings must be saved to a new sequential file TableBookings.DAT …
Constructs · 11 marks
(a) When a booking enquiry is made, the number of customers is given. Complete the pseudocode for the procedure TakeBooking: PROCEDURE TakeBooking DECLARE ……………………………………………………, ………
Constructs · 6 marks
(e) At the end of the day, the computer is shut down. Before the program stops, the array data from TableBookings must be saved to a new sequential file TableBookings.DAT Write pr…
