Levels Tought:
University
Teaching Since: | Apr 2017 |
Last Sign in: | 344 Weeks Ago, 4 Days 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
Write a script file to play a simple number guessing game as follows. The script should generate a random integer in the range 1, 2, 3, . . . , 14, 15. It should provide for the player to make repeated guesses of the number, and should indicate if the player has won or give the player a hint after each wrong guess. The responses and hints are:
■ “You won,” and then stop the game.
■ “Very close,” if the guess is within 1 of the correct number.
■ “Getting close,” if the guess is within 2 or 3 of the correct number.
■ “Not close,” if the guess is not within 3 of the correct number.
-----------