Question: In this assignment you will create a hangman game while also keeping track of the user s high scores. I will provide a text file

In this assignment you will create a hangman game while also keeping track of the users high scores. I
will provide a text file full of roughly 180,000 words that you can randomly pick from, named dictionary.txt Your program will display the
number of characters in the hidden word, and if the user has correctly guessed any letters, display that
letter in the correct spot. The user will have 7 guesses to figure out the word, which resets on each
correctly solved word, and the user is given a new hidden word. A correct guess does not reduce the
number of guesses. On the 7th wrong guess, the game ends, and the user is shown their score, and if
they make the top 5 all-time high scores, they are asked to enter their name. Then the high score list is
displayed and the program is done. You must also handle the input correctly, asking the user to re-enter
any guesses that arent valid.
Assume that the randomly chosen word was house. If the user has made 3 guesses, L, B, S the output
would look like this:
Hidden Word: ___ S _
Incorrect Guesses: B, L
Guesses Left: 5
Score: 10
Enter next guess: D
Sorry, there were no Ds
Hidden Word: ___ S _
Incorrect Guesses: B, D, L
Guesses Left: 4
Score: 10
Enter next guess:
Please notice that the Incorrect Guesses list is in alphabetical order.
The scoring works as follows:
For a correct guess, they get 10 points for each instance of the letter.
o Eg. If the hidden word is "letter"
o A guess of "r" gets 10 points
o A guess of "t" gets 20 points
Each correct word is worth 100 points +30 points for each remaining guess
left.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!