Computer Science 9608 · 11

Programming

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

Reset
2016 May-June · Paper 41 · Q6(b)

Constructs · 0 marks

(b) The layout of the board at the start of the game is shown below: x y 1 2 3 4 5 6 7 8 1 2 3 4 5 6

2016 May-June · Paper 42 · Q4(a)(i)

Constructs · 1 mark · official answer ready

(i) DeadlineYear is assigned value 2011. Identify the car registrations for cars which are due to be tested. ......................................................................…

2016 May-June · Paper 42 · Q4(b)

Constructs · 3 marks · official answer ready

(b) If a car fails one of the two tests, a retest is allowed. Write a new rule for this. retestAllowed(..............................) if .........................................…

2016 May-June · Paper 42 · Q4(c)(i)

Constructs · 2 marks · official answer ready

(i) The list [a07,p03] is denoted by [A|B] State the value of A and B. A = ...................................................................................... B = .............…

2016 May-June · Paper 42 · Q4(c)(ii)

Constructs · 1 mark · official answer ready

(ii) The lists [c03,d02,n05|C] and [c03,d02,n05,p05,m04] are identical. State the value of C. C = .................................................................................…

2016 May-June · Paper 42 · Q4(c)(iii)

Constructs · 1 mark · official answer ready

(iii) The list [a06,a02] is denoted by [D,E|F] State the value of F. F = ..................................................................................... [1] 10

2016 May-June · Paper 42 · Q6(a)

Constructs · 4 marks · official answer ready

(a) A state-transition diagram is drawn to clarify how the game is played. Complete the following state-transition diagram. WHITE WINS No move :+,7(·6 possible TURN Stalemate BLAC…

2016 May-June · Paper 42 · Q6(b)

Constructs · 0 marks

(b) The layout of the board at the start of the game is shown below: x y 1 2 3 4 5 6 7 8 1 2 3 4 5 6

2016 May-June · Paper 43 · Q4(a)(i)

Constructs · 1 mark · official answer ready

(i) DeadlineYear is assigned value 2011. Identify the car registrations for cars which are due to be tested. ......................................................................…

2016 May-June · Paper 43 · Q4(b)

Constructs · 3 marks · official answer ready

(b) If a car fails one of the two tests, a retest is allowed. Write a new rule for this. retestAllowed(..............................) if .........................................…

2016 May-June · Paper 43 · Q4(c)(i)

Constructs · 2 marks · official answer ready

(i) The list [a07,p03] is denoted by [A|B] State the value of A and B. A = ...................................................................................... B = .............…

2016 May-June · Paper 43 · Q4(c)(ii)

Constructs · 1 mark · official answer ready

(ii) The lists [c03,d02,n05|C] and [c03,d02,n05,p05,m04] are identical. State the value of C. C = .................................................................................…

2016 May-June · Paper 43 · Q4(c)(iii)

Constructs · 1 mark · official answer ready

(iii) The list [a06,a02] is denoted by [D,E|F] State the value of F. F = ..................................................................................... [1] 10

2016 May-June · Paper 43 · Q6(a)

Constructs · 4 marks · official answer ready

(a) A state-transition diagram is drawn to clarify how the game is played. Complete the following state-transition diagram. WHITE WINS No move :+,7(·6 possible TURN Stalemate BLAC…

2016 May-June · Paper 43 · Q6(b)

Constructs · 0 marks

(b) The layout of the board at the start of the game is shown below: x y 1 2 3 4 5 6 7 8 1 2 3 4 5 6

2015 October-November · Paper 21 · Q5(b)

Constructs · 6 marks · official answer ready

(b) Complete the pseudocode for this design. OUTPUT "Enter purchase price" INPUT PurchasePrice CurrentValue ← .....................................................................…

2015 October-November · Paper 21 · Q6(c)(ii)

Constructs · 1 mark · official answer ready

(ii) Copy the condition which is used to control a ‘pre-condition’ loop. ..........................................................................................................…

2015 October-November · Paper 21 · Q6(d)

Constructs · 4 marks · official answer ready

(d) Line 17 in the pseudocode outputs the staff number and the task number. Staff number Staff name A new requirement is to display the name of the member of staff given in the ta…

2015 October-November · Paper 21 · Q8(d)(ii)

Constructs · 3 marks · official answer ready

(ii) Describe three specification changes which will make the program more useful. 1 ..............................................................................................…

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

Constructs · 0 marks

4 The standard pack of playing cards has four suits – called Clubs, Diamonds, Hearts and Spades. Each card has a value shown by its number or a name: 1 (Ace), 2, 3, … 10, 11 (Jack…