Programming
471 questions. Open a question to solve it and check the official answer.
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
Constructs · 1 mark · official answer ready
(i) DeadlineYear is assigned value 2011. Identify the car registrations for cars which are due to be tested. ......................................................................…
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 .........................................…
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 = .............…
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 = .................................................................................…
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
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…
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
Constructs · 1 mark · official answer ready
(i) DeadlineYear is assigned value 2011. Identify the car registrations for cars which are due to be tested. ......................................................................…
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 .........................................…
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 = .............…
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 = .................................................................................…
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
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…
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
Constructs · 6 marks · official answer ready
(b) Complete the pseudocode for this design. OUTPUT "Enter purchase price" INPUT PurchasePrice CurrentValue ← .....................................................................…
Constructs · 1 mark · official answer ready
(ii) Copy the condition which is used to control a ‘pre-condition’ loop. ..........................................................................................................…
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…
Constructs · 3 marks · official answer ready
(ii) Describe three specification changes which will make the program more useful. 1 ..............................................................................................…
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…
