A fully interactive Command-Line Hangman Game developed in Python. This project demonstrates the use of core Python concepts such as loops, conditional statements, lists, strings, functions, user input validation, and randomization while providing an enjoyable word-guessing experience.
Hangman is a classic word-guessing game where the player attempts to reveal a hidden word by guessing one letter at a time. The player starts with 6 lives, and every incorrect guess reduces one life. The game ends when the player either guesses the complete word or runs out of lives.
This project was built as part of my Python learning journey to strengthen problem-solving skills and programming logic.
- ๐ฒ Random word selection
- โค๏ธ Six lives system
- ๐ค Hidden word display using underscores
- โ Correct guess detection
- โ Incorrect guess handling
- ๐ซ Duplicate letter validation
- โ๏ธ Single-letter input validation
- ๐ Winning message
- ๐ Game Over screen
- โณ Loading animation
- ๐ฅ๏ธ Clean command-line interface
- Python 3
- Random Module
- Time Module
- OS Module
- Launch the game.
- Press Enter to start.
- Guess one letter at a time.
- Correct letters appear in their positions.
- Incorrect guesses reduce your remaining lives.
- Win by revealing the complete word before your lives reach zero.
Word: _ _ _ _ _
Lives: โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ
Guess a letter: a
โ
Correct Guess!
Word: a _ _ _ _
Lives: โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ
- Variables
- Data Types
- Lists
- Strings
- Loops
- Conditional Statements
- User Input
- Random Module
- Functions
- Input Validation
- Basic Game Logic
- Multiple difficulty levels
- Categories (Animals, Fruits, Countries, Technology)
- ASCII Hangman graphics
- Scoreboard system
- Save high scores
- Play Again option
- Timer mode
- Multiplayer mode
- External word database
- Colorful terminal interface
Contributions, suggestions, and improvements are always welcome.
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Open a Pull Request.
Hasnain Jamil
Aspiring Python Developer passionate about building projects that improve programming skills and problem-solving abilities.
โญ If you found this project helpful, consider giving it a star on GitHub!