The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
University
| Teaching Since: | Apr 2017 |
| Last Sign in: | 438 Weeks Ago, 1 Day Ago |
| Questions Answered: | 9562 |
| Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
Modify the widget Game from Problem 9.24 so that a new game starts automatically when the user has guessed the number. The window informing the user that she made the correct guess should say something like “Let’s do this again . . .” Note that a new random number would have to be chosen at the start of each game.
Problem 9.24
In Problem 9.23, pressing the Enter/Return key on your keyboard after entering a guess in the entry is ignored. Modify the the Game GUI so that pressing the key is equivalent to pressing the button.
Problem 9.23
Develop new widget Game that implements a number guessing game. When started, a secret random number between 0 and 9 is chosen. The user is then requested to enter number guesses. Your GUI should have an Entry widget for the user to type the number guess and a Button widget to enter the guess:

If the guess is correct, a separate window should inform the user of that. The user should be able to enter guesses until he makes the correct guess.
-----------