Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions