|
-
REMEMBER: Your variables and functions are to be saved in a
particular format. If they are not, you will not get credit for your
assignment. Variables should be named with the first initial of
your first name, first initial of your last name, the letter v, an
underscore and the name of your variable. Ex: ncv_variable name
Functions should be named in the same way. Ex: ncf_function name
-
In this program you will create a game that challenges the player
(user) to guess a number. The object is to guess the number in as
few tries as possible. Your program will need to...
-
Explain the game to the player.
-
Generate a random number between any two numbers that you (the
programmer)will select and code into the application. You will
need to include the limits you select in the instructions to the
player.
-
Your program will set up a loop that will repeat until the player
guesses the number. While in the loop if the player guesses too high
your program will reply "Too High" and if the player guesses too
low your program will reply "Too Low".
-
You will keep track of the number of tries it takes the player to
guess the correct answer.
-
When the player guesses correctly you will congratulate the player
and inform the player how many tries it took.
-
Your program will ask the player if they wish to play the game again
and will loop until the player indicates they do not wish to play
any more.
-
You can use the review of this problem in the back of the chapter,
however, you cannot use any of the same variables used in the book
(you must create your own variables).
-
Save your program to a file and take a screenshot of the output after
you have run your program. You will have 2 files that you will send as
attachments to your email.
(DO NOT COPY AND PASTE YOUR CODE, PROGRAM(S) OR SCREENSHOTS INTO
THE BODY OF THE EMAIL. THIS WILL RESULT IN A GRADE OF ZERO !)
Make sure to include your name and the assignment number you are
emailing.
|