A text-based Hangman game written in Python. The program selects a random word, and the player guesses one letter at a time to uncover the word. The game allows a limited number of incorrect guesses before the player loses.
- Random word selection.
- Tracks guessed letters.
- Limits incorrect attempts to 6.
- Displays the current progress of the word.
- Provides user-friendly messages.
- Clone the repository:
git clone https://github.com/Muawiya-contact/hangman-game.git
- Navigate to the project directory:
cd hangman-game
- Run the game:
python hangman.py
- The game will display an underscore
_
for each letter in the hidden word. - The player enters a single letter guess.
- If the letter is correct, it is revealed in the word.
- If the letter is incorrect, the number of attempts decreases.
- The game continues until the word is guessed or the player runs out of attempts.
Welcome to Hangman! Test your word-guessing skills.
Current Word: _ _ _ _ _ _
Attempts Remaining: 6
Enter a letter: p
Excellent! The letter is part of the word.
Current Word: p _ _ _ _ _
Attempts Remaining: 6
Enter a letter: x
Incorrect guess. Please try again.
Current Word: p _ _ _ _ _
Attempts Remaining: 5
...
Gmail:[email protected] GitHub: https://github.com/Muawiya-contact