Question: Python Question 3 A simple game application allows a single player to play a guessing game repeatedly. Game play .The player has 50 chips at
Python





Question 3 A simple game application allows a single player to play a guessing game repeatedly. Game play .The player has 50 chips at the start of the session. Before every new game, the player enters a positive number that is at least 4, e.g., 7. A random sequence of whole numbers from 1 to that number is then generated, e.g., 5241673. The fint mumber is cvlohler, in isae,. He makes a guess whether the next number is higher (h) or lower (1) than the number just revealed, and then places the number of chips he wishes to bet with. The player may also choose to skip guessing by entering an empty string Whether the player makes a guess or skips, the next number is revealed, in this case, 2. If the player makes a guess and the guess is correct, he wins some chips, an amount described under the heading Bet Amount. Otherwise, he loses the chips he bets with. Display the number of chips the player has after computing his win or loss, or after his skip, on the console (output screen) as well as into a file, Q3Out.txt The game continues with the player guessing or skipping until the third number from the end (or right) of the sequence is revealed, in this case 6. Then the game ends. This means that the player gets to make a guesses up to 3 less than the number he enters before the game started
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
