Question: Modify your guessing game.py program from the previous lab as follows: After the player has finished the game, ask if they'd like to play

Modify your guessing game.py program from the previous lab as follows: After the player has finished the Enter your guess: 2 Woohoo, you got it! It only took you 1 try. You should consider a career in the psychic 

Modify your guessing game.py program from the previous lab as follows: After the player has finished the game, ask if they'd like to play again. If so, restart the game with a new random number, without changing the range of possible numbers that was originally entered by the player. After the player finishes each game, show statistics on the lowest, highest, and average number of guesses taken by the player over all games played. The other features (how the game works, input validation, etc.) should be unchanged. Example program run (underlined parts indicate what the user enters) Let's set up our guessing game! I'll pick a random integer between a certain min and max (inclusive) that you specify. Min: 2 Max: 4 OK, let's play! I'm thinking of an integer between 2 and 4, inclusive. Enter your guess: 2 Enter your guess: 2 Woohoo, you got it! It only took you 1 try. You should consider a career in the psychic industry. Your stats so far:. Minimum guesses taken: 1 Maximum guesses taken: 1 Average guesses taken: 1.0 Play again? (Y for yes, anything else for no): Y OK, let's play! I'm thinking of an integer between 2 and 4, inclusive. Enter your guess: 4 Too high! Try again... Enter your guess: 3 Woohoo, you got it! It only took you 2 tries. Your stats so far:: Minimum guesses taken: 1 Maximum guesses taken: 2 Average guesses taken: 1.5 Play again? (Y for yes, anything else for no): N

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!