Your task is to implement the hangman game in python before


Task

Your task is to implement the Hangman game in Python. Before implementing the game, please play the game on the website mentioned above. It will help you understand the project.

Project Specifications:

1) Output a brief description of the game of hangman and how to play.

2) Ask the user to enter the word or phrase that will be guessed (have a friend enter the phrase for you if you want to be surprised). Error check: repeatedly ask for a word or phrase until the input is letters and spaces.

3) Output the appropriate number of dashes and spaces to represent the phrase. Dashes are placeholders for letters.

4) Continuously read guesses of a letter from the user and replace the corresponding dashes if the letter is in the word (replace all occurrences, upper and lower case, of the letter), otherwise report that the user has made an incorrect guess.

Error check: only accept letters and spaces. An incorrect guess is counted as a guess, but a guess that is not letters and spaces is not counted as a guess. If a guess is more than one letter, it is assumed to be a guess of the whole phrase: if the match is perfect (independent of case), the game is won; if not, the game is over as a loss.

5) Each turn you will display the phrase as dashes but with any already-guessed letters filled in, as well as which letters have been incorrectly guessed so far and how many guesses the user has remaining.

Case of original input must be preserved, e.g. an upper-case letter in word/phrase must always be displayed in upper case even if the user guessed using a lower-case letter.

6) Your program should allow the user to make a total of k=6 guesses. After the 6th guess, the game is either won with a correct guess or the game ends as a loss.

7) One run of the program plays the game once. Do not have a loop to restart the game.

Assignment Notes:

1. Simplify: a. Leave error checking to last.

b. Write your first version to handle a single word (not a phrase of multiple words).

2. To clarify the project specifications, sample output is appended to the end of this document.

3. You may not use advanced data structures such as lists, sets, or dictionaries.

4. Items 1-7 of the Coding Standard will be enforced for this project.

5. Review the syllabus with respect to collaboration. What you hand in must be your own work.

Among other things, note this one: "If you show your code to another student, you are almost guaranteed a zero because most novice programmers will not be able to think of another way to do it and end up copying your code or sharing it with someone else who copies it."

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Your task is to implement the hangman game in python before
Reference No:- TGS02943837

Expected delivery within 24 Hours