2. (10 points) Modify your guessing game from the previous lab (guessing-game.py) to allow the player to play more than

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2. (10 points) Modify your guessing game from the previous lab (guessing-game.py) to allow the player to play more than

Post by answerhappygod »

2 10 Points Modify Your Guessing Game From The Previous Lab Guessing Game Py To Allow The Player To Play More Than 1
2 10 Points Modify Your Guessing Game From The Previous Lab Guessing Game Py To Allow The Player To Play More Than 1 (52.83 KiB) Viewed 45 times
2. (10 points) Modify your guessing game from the previous lab (guessing-game.py) to allow the player to play more than once, keeping track of some statistics over time. Specifically: After each game, the player should be able to play again if desired. Playing again makes the computer pick a new random number, but it does not allow the player to re-choose the range of random numbers. • Keep track of statistics on how many games the player has completed, the player's lowest number of guesses, the player's highest number of guesses, and the player's average number of guesses. Show these stats after each game. . Do not use any built-in Python statistics functions such as min and max. 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: 3 Max: 8 OK, let's play! I'm thinking of an integer between 3 and 8, inclusive. Enter your guess: 5 Too low! Try again... Enter your guess: I Too low! Try again... Enter your guess: 8 Woohoo, you got it! It only took you 3 tries. Your stats so far: Games played: 1 Least guesses: 3 Most guesses: 3 Average guesses: 3.0 Play again? (Y or y for yes, anything else for no) y
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply