Computer Science 9608 · 11

Programming

471 questions. Open a question to solve it and check the official answer.

2017 May-June · Paper 43 · Q2(b)(i)

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…

2016 October-November · Paper 12 · Q3

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…

2016 October-November · Paper 12 · Q9(c)

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 …

2016 October-November · Paper 21 · Q12

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…

2016 October-November · Paper 21 · Q12(c)

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…

2016 October-November · Paper 21 · Q19(b)

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…

2016 October-November · Paper 21 · Q19(b)(iv)

Programming basics · 13 marks

(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…

2016 October-November · Paper 21 · Q19(c)(ii)

Structured programming · 1 mark

(ii) The additional statement required within the function body to complete the change from a procedure to a function. ............................................................…

2016 October-November · Paper 22 · Q4(b)

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…

2016 October-November · Paper 22 · Q4(c)

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…

2016 October-November · Paper 22 · Q5(b)(ii)

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…

2016 October-November · Paper 23 · Q1(a)

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

2016 October-November · Paper 23 · Q2

Programming basics · 0 marks · official answer ready

2 INPUT BaggageWeight

2016 October-November · Paper 23 · Q12

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…

2016 October-November · Paper 23 · Q12(c)

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…

2016 October-November · Paper 23 · Q19(b)

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…

2016 October-November · Paper 23 · Q19(b)(i)

Constructs · 4 marks

(i) Term CHARACTERCOUNT("TSUNAMI") Term ............................................................................................................................[1]

2016 October-November · Paper 23 · Q19(b)(ii)

Constructs · 4 marks

(ii) Answer1 ASC('G') + ASC() Answer1 ......................................................................................................................[1]

2016 October-November · Paper 23 · Q19(b)(iii)

Constructs · 4 marks

(iii) Answer2 CHR(CHARACTERCOUNT("HELLO") + 70) Answer2 ......................................................................................................................[1]

2016 October-November · Paper 23 · Q19(b)(iv)

Programming basics · 13 marks

(iv) Word SUBSTR("Welcome home", 4, 7) ) Word ............................................................................................................................[1] 9 Que…