Question 3(d)(ii) 2015 · May-June · Paper 23 · 8 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 3
Part (d)
(ii)
Question 3
07
Question 19
climb to top of ladder The top of a slide, so
Question 6
Question 10
03 move down the slide Ali plans to write a program to test different board designs. Each board design will have different numbers, positions and lengths for the slides and ladders. The program is to test each board design to check that it is possible to complete the game in a reasonable number of moves. For each board design, the program will simulate playing the game 1000 times and report the average number of moves.
Question 5
(ii)
The function NumberOfMovesInThisGame counts how many moves the player took to complete the game and returns this value. The game ends when the player reaches the final square (Square 30). If a die roll produces a number that would go beyond the final square the die roll counts as a move but the player’s position remains as before. Complete the pseudocode on the next page.
Question 9
FUNCTION NumberOfMovesInThisGame() DECLARE .......................................................................................................................................... DECLARE .......................................................................................................................................... DECLARE .......................................................................................................................................... PlayerPosition ← ..................................................................................................................... MovesSoFar ← .............................................................................................................................. // REPEAT NumberRolled ← ................................................................................................................... MovesSoFar ← ....................................................................................................................... // check that move does not go beyond final square IF .............................................................................................................................................. THEN // make move PlayerPosition ← .................................................................................................. // check for slide or ladder and, if required, move ........................................................................................................................................ ........................................................................................................................................ ........................................................................................................................................ ........................................................................................................................................ ENDIF UNTIL .............................................................................................................................................. // ........................................................................................................................................................... ENDFUNCTION
Question 10
Why this question appears here
72% assigned-topic match · Hardware › Logic gates and logic circuits
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s15_qp_23.pdf
