Homework 6

Assigned 4/25/05

Task: Write a program to allow two people to play hangman. The first user should enter a word. The program should then print out an empty gallows, a set of underscore characters representing the length of the word, and then ask the second user to enter letters. After each letter is entered, the gallows and blanks should be displayed with either the gallows filled in or the letter(s) filled in, depending on whether the second player entered a correct letter.

The game should end either when the word has been correctly guessed or the man has been hung. At this point, your program should display a message indicating that the game is over and whether the second user won or lost. It should then ask whether the users want to play again and, if they do, start the process over.

Purpose: To practice integrating all of the many skills you have learned thus far.