Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions