Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python 2. Reset the file pointer for the words.txt back to the first entry. 3. Read the first word and store it in a variable.
python
2. Reset the file pointer for the words.txt back to the first entry. 3. Read the first word and store it in a variable. 4. Print out a - for each of the letters in the word. 5. Allow the user 5 chances to guess the letters. It will always allow 5 guesses (no more, no less). 6. If they have guessed all the correct letters then print You Win", if not, print "You Lose". 7. Here is the example output (the first word is cat): Mystery word: --- Please enter a letter: c Please enter a letter: y Please enter a letter Please enter a letter: t Please enter a letter: a You Win! u Mystery word: --- Please enter a letter: C Please enter a letter: y Please enter a letter: u Please enter a letter: t Please enter a letter: g You LoseStep 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