9210 International Gcse Computer Science Question Paper 1 v1.0
9210 International Gcse Computer Science Question Paper 1 v1.0
Surname
Forename(s)
Candidate signature
INTERNATIONAL GCSE
COMPUTER SCIENCE
PAPER 1 PROGRAMMING
For this paper you must have access to: question Mark
• a computer 1
• a printer
2
• appropriate software.
3
• An electronic version of the Skeleton Program.
• A hard copy of the Preliminary Material. 4
Information 5
• The marks for questions are shown in brackets. 6
• The maximum mark for this paper is 80.
7
• No extra time is allowed for printing and collating.
• The question paper is divided into three sections. 8
• You may use a bilingual dictionary. 9
• You may not use an English dictionary.
• You are not allowed to use a calculator. TOTAL
Instructions
• Type the information required on the front of your Electronic Answer Document.
• Answer all questions.
• Enter your answers into the Electronic Answer Document.
• Before the start of the examination make sure your centre number, candidate name and
candidate number are shown clearly in the footer of every page of your Electronic Answer
Document (not the front cover).
Secure all your printed Electronic Answer Document pages and hand them to the
invigilator
2
The questions in this section are about programming and how the Skeleton Program works. You
should not make any changes to the Skeleton Program whilst answering these questions.
0 1 . 1 The Skeleton Program makes use of integer type variables, for example Row.
0 1 . 6 State the name of a local variable that is used in the DisplayBoard subroutine.
[1 mark]
Explain why the calculation performed is different for odd and even numbered
rows.
[1 mark]
0 2 . 3 The board is displayed as a grid, but a one-dimensional array has been chosen to
represent this instead of a two-dimensional array.
Explain what the purpose of this assignment statement is and what the MOD
operation does in the assignment statement.
[2 marks]
Turn over
4
Include the evidence required for your answers to Section B in your Electronic Answer Document.
The questions in this section require you to make changes to the Skeleton Program.
Note that all of the programming questions in sections B and C can be answered
independently of each other. Therefore, if you cannot answer one of the questions you can
still attempt to solve later questions.
You are advised to keep a backup copy of the original Skeleton Program so that you can go
back to it if you accidentally make changes to the program which means it can no longer be
compiled/executed while answering the questions in sections B and C.
Modify the subroutine PlayGame so that this message is displayed once at the
start.
Test that your change has worked by running the Skeleton Program.
0 3 . 2 SCREEN CAPTURE(S) to show that the message is displayed at the start of the
game.
[1 mark]
5
0 4 For each turn, the message "You have landed on square: X", where X
is the number of the square that the player has landed on is to be displayed.
If the player has landed on a ladder or a snake, X should be the number of the
square that the player is on after they have moved up or down the ladder/snake.
This message should be displayed after the existing message that tells the player
what value the die has rolled and before the board is redisplayed to show the player’s
new position.
Modify the subroutine MakeMove so that the message is displayed when a turn is
taken.
Test that your change has worked by running the Skeleton Program and taking one
turn.
0 4 . 2 SCREEN CAPTURE(S) to show that the message is displayed after one turn.
[1 mark]
Turn over
6
0 5 If the player lands on a snake or a ladder the Skeleton Program currently displays
the message "You have landed on a snake or ladder".
The information provided in this message is to be changed so that the player is told
whether they landed either on a snake or a ladder and, if so, between which two
squares they will be moving.
For example:
or
where X is the square that the player landed on when the die was rolled and Y is the
square that the snake or ladder took them to.
Test that your change has worked by running the Skeleton Program and taking one
turn. When taking the turn, select option J and jump to square 58.
0 6 The Skeleton Program lets the player play the game only once. After this, the player
must run the program again to play a second game.
If the player types in a letter Y the game should automatically play again. If N is
typed, then the program should exit.
Modify the subroutine Main so that the game can be played again, as described
above.
0 6 . 2 SCREEN CAPTURE(S) to show that when the game ended, and you asked to play
again, a new game started.
In your SCREEN CAPTURE(S) it must be possible to see that the player has
entered Y and that the game has restarted.
[1 mark]
Turn over
8
0 7 In the Skeleton Program the game finishes when a player lands on square 99 or
goes past it.
The game is to be changed so that it finishes only when a player lands on square 99.
If a player rolls a number on the die that would take them past square 99 they should
not move on that turn.
For example:
• If a player is on square 94 and rolls a 5 they will land on square 99 and the
game should finish.
• If a player is on square 95 and rolls a 5 the roll would take them past square
99 to square 100, so the player should stay on square 95 for that turn.
If the player cannot move because their roll would take them past square 99 then the
message "Turn missed as roll too high" should be displayed.
Modify the subroutine MakeMove so that if a die roll would take the player past
square 99 the player does not move and the required message is displayed.
0 7 . 2 SCREEN CAPTURE(S) to show that when the die roll takes the player past square
99 they stay on their current square and the required message is displayed.
[2 marks]
9
Include the evidence required for your answers to Section C in your Electronic Answer Document.
The questions in this section require you to make changes to the Skeleton Program.
The player to be sent back will be chosen at random with an equal chance of each
player being chosen.
Suitable message(s) will need to be displayed so that the players understand what
has happened.
For example, if Player 0 is on square 23 and Player 1 then lands on square 23 then
one of the two players, selected at random, will be moved back to square 0 whilst the
other will stay on square 23.
The new subroutine should be called from the PlayGame subroutine, after
the MakeMove subroutine has been called.
If you are unable to implement this feature by creating a new subroutine with
parameters, you will still be able to get most of the marks for it if you write all of the
code to implement it in the PlayGame subroutine instead.
0 8 . 2 SCREEN CAPTURE(S) that show the two players landing on square 15 and that
after this one player is moved to square 0 whilst the other remains on square 15.
[2 marks]
Turn over
10
0 9 The snakes and ladders are currently placed at fixed positions on the board.
The Skeleton Program should be changed so that the five ladders are placed at
random positions on the board and are of random lengths.
• Both ends of a ladder must be on the board. For example, a ladder starting at
square 87 could not be 20 squares long as this would lead to square 107,
which is not on the board. The maximum length of a ladder starting at square
87 would be 12.
Test that your changes have worked by running the program and checking that the
list of snakes and ladders displayed at the start of the game fulfils as many of the
requirements of the task as you can.
0 9 . 2 SCREEN CAPTURE(S) that show the list of ladder positions on the board.
[2 marks]
END OF QUESTIONS
Permission to reproduce all copyright material has been applied for. In some cases, efforts to contact copyright-holders may have
been unsuccessful and Oxford International AQA Examinations will be happy to rectify any omissions of acknowledgements. If you
have any queries please contact the Copyright Team, AQA, Stag Hill House, Guildford, GU2 7XJ.
Copyright © 2017 Oxford International AQA Examinations and its licensors. All rights reserved.