Question: 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.

 2. Reset the file pointer for the words.txt back to the

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 Lose

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!