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 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 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 th wrong guess, the game ends, and the user is shown their score, and if
they make the top alltime 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 reenter
any guesses that arent valid.
Assume that the randomly chosen word was house. If the user has made guesses, L B S the output
would look like this:
Hidden Word: S
Incorrect Guesses: B L
Guesses Left:
Score:
Enter next guess: D
Sorry, there were no Ds
Hidden Word: S
Incorrect Guesses: B D L
Guesses Left:
Score:
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 points for each instance of the letter.
o Eg If the hidden word is "letter"
o A guess of r gets points
o A guess of t gets points
Each correct word is worth points points for each remaining guess
left.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
