Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python 3 program: We have to use for loops, while loops, if statements, and functions. Please try not to do advance techniques. Thank you! For
Python 3 program: We have to use for loops, while loops, if statements, and functions. Please try not to do advance techniques. 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 gameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started