Question: Python 3 program: This is what I have so far. We have to use at least three functions. Please don't do anything too advanced. Thank

Python 3 program: This is what I have so far. We haveto use at least three functions. Please don't do anything too advanced.Python 3 program: This is what I have so far. We have to use at least three functions. Please don't do anything too advanced. Thank you!

For this assignment, you should write program that will let the user play the classic game of "hangman." The program will have a hidden word, and will ask the user to keep guessing letters until the word has been guessed, or until the user has made six incorrect guesses. After each guess, the program should (1) tell the user if the guess was correct or incorrect, (2) show the status of the word being guessed (with each correctly guessed letter in place, and (3) tell the user how many incorrect guesses are remaining. Here's an example (assume the word to be guessed is apple): The word I am thinking of has 5 letters. You can make 6 incorrect guesses. Please guess a letter now: s That is incorrect Your word is:** You have 5 incorrect guesses remaining. Please guess a letter now: t That is incorrect. Your word is:** You have 4 incorrect guesses remaining. Please guess a letter now: p Yes, the word contains that letter. Your word is: pp You have 4 incorrect guesses remaining. Please guess a letter now: a Yes, the word contains that letter. Your word is: app You have 4 incorrect guesses remaining. Please guess a letter now: r That is incorrect Your word is: app* You have 3 incorrect guesses remaining. Please guess a letter now: e Yes, the word contains that letter Your word is: app e You have 3 incorrect guesses remaining. Please guess a letter now: I Yes, the word contains that letter. Your word is: apple Congratulations, you have won the game! secretword- ocean quessword for i in range (len(secretword)) quesswordguessword print("The word I'm thinking of has 5 letters. You can make 6 incorrect guesses" userguess inputC"Type in a letter" found -False for i in range Clen (secretword)): if userguesssecretword[i]: tempword guessword:i]userguess+guesswordi:] guessword- tempo rd lag True

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!