|
-
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 the popular kids game called
Hangman. In this game the player tries to guess a word by
guessing what letters are in the word. Each miss results in
another piece of a hanging stick figure. As soon as the figure
is complete, the player loses. Your program will:
-
Use a Dictionary.
-
Use a List.
-
Use embedded While lists.
-
Use a For loop.
-
Use the range() and len() functions.
-
Compare the users guess to the selected word.
-
Congratulate the player when the player gets the right answer.
-
Count the number of tries the player uses to guess the word.
-
As with the last problem, you can use the discussion on this problem
in the back of the chapter, but you cannot use any of their variables
(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.
|