Skip to content

This Python code implements the classic Hangman game. You're presented with a hidden word represented by a row of underscores. Your goal is to guess the word letter by letter, revealing the correct ones in their positions. With each incorrect guess, you lose a life.

Notifications You must be signed in to change notification settings

chandan0069/Hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hangman

This Python code implements a fun and challenging Hangman game where you try to guess a secret word letter by letter.

Save the code files as: hangman.py (main script) hangman_words.py (list of words to choose from) hangman_art.py (visual representations of hangman stages) Run the script: python hangman.py

Gameplay:

The game will start with the classic Hangman logo. You'll see a row of underscores representing the hidden word's length. Guess a letter by entering it and pressing Enter. The game will: Reveal the guessed letter in the correct positions if it's in the word. Inform you if you've already guessed that letter. Deduct a life and display the corresponding hangman stage if your guess is wrong. The game ends when: You successfully guess all the letters (win). You run out of lives (lose).

Key Files:

hangman.py: Main script handling game logic, user interaction, and importing modules. hangman_words.py: Contains a list of words the game can choose from. hangman_art.py (Import Required): Provides visual representations of the hangman stages based on remaining lives.

About

This Python code implements the classic Hangman game. You're presented with a hidden word represented by a row of underscores. Your goal is to guess the word letter by letter, revealing the correct ones in their positions. With each incorrect guess, you lose a life.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages