Question: This will be a bit of practice writing a bit longer of a program, if your solution is around 30-40 lines of code that shouldn't

 This will be a bit of practice writing a bit longer
of a program, if your solution is around 30-40 lines of code

This will be a bit of practice writing a bit longer of a program, if your solution is around 30-40 lines of code that shouldn't be too surprising. Hangman is a pretty well known game, where you start with a word, and then you guess letters. As you guess more letters you should fill in the word. The original game has a man you draw in who is eventually completed at which point the game is lost. We're going to simplify this and just have the ability to guess until you get the word right. You should do the following: 1) Ask the user for a word, or 'quit' to exit. 2) Convert the word to lowercase using.lower() because it'll simplify all of our lives. 3) Make a printable version of the word with! characters replacing the characters not guessed yet. 4) Ask the user for a single character (and check to make sure it's a single character). a) if the character is not in the word, tell the user that they've guessed an incorrect letter. b) If the character is in the word, then replace all of the appropriate _'s with the letter that was guessed. 5) Go back to step 1 once they guess the word. Hints: 1. Use join to make the partially hidden word. 2. Remember that list(a_string) will convert a string to a list of single characters. I didn't exactly use this but it could be another way to do it, and would be helpful. 12:03 AM Sat Mar 6 29%

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 Databases Questions!