Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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 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_2

Step: 3

blur-text-image_3

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Dress appropriately to enhance your credibility.

Answered: 1 week ago