Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python 3.6.1 or How the Game Works At the very beginning of your program, you will tell the user how long your secret word is.
python 3.6.1
or
How the Game Works At the very beginning of your program, you will tell the user how long your secret word is. For example, if your word has five letters in it, your program will say: The secret word has length S Each time the user makes a guess, they will have the option of guessing either a single letter or the whole word Suppose they guess a single letter. If that letter is not in your secret word, your program will say: That letter is not in the word. If that letter is in the word. your program will say so. It will also tell the user how many times that letter occurs in the word. For example, if the letter occurs twice, your program will say That letter is in the word! Count: 2 Suppose they try to guess the whole word. If they guess correctly, your program will say That is the correct word! Your program will then terminate. If they guess incorrectly, your program will say That is not the correct word. Suppose they enter a guess that isn't the same length as the secret word and isn't one character. Your program should say: That is not a valid euess. The user has a limited number of incorrect guesses. Each time the user guesses a letter that is not in the secret word, this counts against their incorrect guess limit. Similarly, each time the user tries to guess the whole word and guesses incorrectly, this also counts against the limit. When the user makes their last incorrect guess, your program should print: You are out of incorrect guesses ! It should then terminate
Step 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