Extended Task 7
'Guess the Number' Multiplayer Game
A primary school teacher wants to create a fun activity for their students to play when it is raining and they have to stay inside during break and lunch.
Five pupils can play the game at once.
Each player chooses a number between 1 and 100. Then a random number is generated.
​
Whoever was furthest from the random number is out of the game.
The four remaining players then pick a new number. This continues with one player being removed each round until only one player is left and they are the winner.
​
Add your own flair and additional features to your program as an extension, including preventing the same number being chosen by multiple players.
For this task, you will need to create a document and include the following sections (with screenshots where appropriate):
​
-
An introduction to explain the Purpose of your program.
-
A List of Requirements for a successful program.
-
Screenshots of your code (with comments in your code to show understanding).
-
Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed.
-
An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program.
Reminders for this task:
-
You will need to use loops to allow the users to enter their numbers.
-
You may wish to use subroutines to decompose the problem into separate rounds.
-
You will need to import the random library to generate a random number in each round.
-
You will need to compare each number to the randomly selected answer using comparison operators such as > and <.
-
There are multiple ways to approach this program, and your solution might look different from the example. Break the problem down and focus on one part at a time.
Example solution:
Introduction & Round One
Round Two