Programming
471 questions. Open a question to solve it and check the official answer.
Constructs · 9 marks · official answer ready
(i) The procedure, InsertRecord, takes as a parameter the customer record to be inserted into the hash table. The procedure makes use of the function Hash. Collisions will be mana…
Constructs · 8 marks · official answer ready
3 When an application program requests a file stored on a hard disk, the computer system reads the file. Use the statement labels A to H to complete the sequence of steps that des…
Constructs · 6 marks · official answer ready
(c) The CLASS table has primary key ClassID and stores the following data: ClassID Description StartDate ClassTime NoOfSessions AdultsOnly DAY01 Yoga beginners 12/01/2016 11:00 5 …
Constructs · 14 marks · official answer ready
12 Is TicketType = 'E' ? Complete the flowchart by putting the appropriate statement number in each flowchart symbol. Statement 5 has been done for you. 3 Start 5 Stop [6] 4 (b) T…
Constructs · 9 marks
12 Is TicketType = 'E' ? Complete the flowchart by putting the appropriate statement number in each flowchart symbol. Statement 5 has been done for you. 3 Start 5 Stop [6] 4 (c) T…
Constructs · 3 marks
19 ENDWHILE 7 (b) Identify the following constructs in the given program, using line numbers. For multi-line constructs give the first line number only. Construct Line number Assi…
Programming basics · 13 marks
(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…
Structured programming · 1 mark
(ii) The additional statement required within the function body to complete the change from a procedure to a function. ............................................................…
Programming basics · 4 marks · official answer ready
(b) Write program code to generate and output four winning numbers. Ignore the issue that duplicate numbers may be generated. Visual Basic and Pascal: You should include declarati…
Structured programming · 3 marks · official answer ready
(c) The prize draw is a success. After six months, the club decided to sell an unlimited number of tickets each week. In any week, the total number of prizes may vary. The program…
Programming basics · 4 marks · official answer ready
(ii) Write the program code for step 02.1 Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for eac…
Constructs · 0 marks · official answer ready
(a) A program flowchart will document the program. The flowchart will contain the following statements: Statement Statement number 1 Charge 0
Programming basics · 0 marks · official answer ready
2 INPUT BaggageWeight
Constructs · 14 marks · official answer ready
12 Is TicketType = 'E' ? Complete the flowchart by putting the appropriate statement number in each flowchart symbol. Statement 5 has been done for you. 3 Start 5 Stop [6] 4 (b) T…
Constructs · 9 marks
12 Is TicketType = 'E' ? Complete the flowchart by putting the appropriate statement number in each flowchart symbol. Statement 5 has been done for you. 3 Start 5 Stop [6] 4 (c) T…
Constructs · 3 marks
19 ENDWHILE 7 (b) Identify the following constructs in the given program, using line numbers. For multi-line constructs give the first line number only. Construct Line number Assi…
Constructs · 4 marks
(i) Term CHARACTERCOUNT("TSUNAMI") Term ............................................................................................................................[1]
Constructs · 4 marks
(ii) Answer1 ASC('G') + ASC() Answer1 ......................................................................................................................[1]
Constructs · 4 marks
(iii) Answer2 CHR(CHARACTERCOUNT("HELLO") + 70) Answer2 ......................................................................................................................[1]
Programming basics · 13 marks
(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…
