Appearance
CS101 Word Game: Hangman
python
import hangman1.MyWordGame as wg
words = wg.WGLib.parseWordsFile('lowerwords.txt')
wg.startSession(words)Brief Description
Classic Hangman — guess the hidden word one letter at a time. Each incorrect guess costs one attempt. Run out of attempts and you lose!
Rules of Play
A random secret word is selected from the dictionary. You will see underscores representing each letter in the word. On each turn, guess a single letter: If the letter is in the word, it appears in all correct positions. If the letter is not in the word, you lose one attempt. Already guessed letters are shown, and duplicates are not allowed. The game ends when:
You guess all letters correctly (win), or
You run out of attempts (lose).
After each game, you may choose to play again.
Settings
Word length range: 4–8 letters
Attempts: 6 incorrect guesses allowed per game
Scoring: Win = 1 point, Lose = 0 points
Difficulty: Determined by random seed (same words each replay)