Question: Hangman - Python A file must contain candidate words, and one must be chosen at random. User should be prompted for letters to guess. Correct

Hangman - Python

A file must contain candidate words, and one must be chosen at random. User should be prompted for letters to guess. Correct guesses will be placed in the corresponding blanks; and, there is a limit to how many incorrect guesses are allowed.

Your program should take care of case-sensitivity, not treating 'a' and 'A' as separate letters. Whether your answers are all upper case or lower case is up to you -- just make sure that the user at the keyboard gets the appropriate responses.

Using Ascii Art to sketch the hanging man would be interesting as well (but this is not necessary).

Example input:

person,lumberjack place,camelot phrase,my hovercraft is full of eels 

Example interface:

What file will the words come from? hangman This one is looking for a phrase: ______ ____ __ ___ ______ ____ __ ____ What is your guess? e There are 3 e's ______ ____ __ __e ______ ___e __ ___e What is your guess? a There are 2 a's a__a__ ____ __ __e ______ ___e __ ___e What is your guess? s There are 2 s's a__a_s ____ __ __e ______ s__e __ ___e What is your guess? i There are 3 i's a__a_s ____ __ __e __i___ si_e __ _i_e What is your guess? z There are no z's (1 incorrect guess) What is your guess? There are 4 o's a__a_s _oo_ o_ __e __i___ si_e o_ _i_e 

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!