A console-based Hangman Game developed in Python as part of the CodeAlpha Python Programming Internship. This project demonstrates Python fundamentals, problem-solving skills, modular programming, and Git version control through the implementation of a classic word-guessing game.
Hangman is a text-based game where the player attempts to guess a hidden word one letter at a time. Each incorrect guess brings the player closer to losing the game by drawing another part of the hangman figure. The player wins by revealing all the letters before reaching the maximum number of incorrect guesses.
This project was built using only Python's standard library and follows clean coding practices with modular functions and clear documentation.
- 🎲 Random word selection from a predefined word list
- 🎯 Letter-by-letter word guessing
- 📝 Input validation
- 🚫 Duplicate guess prevention
- 📊 Remaining attempts counter
- 🎨 ASCII Hangman visualization
- 🏆 Win and Lose detection
- 🔁 Play Again functionality
- 🧩 Modular and well-organized code
- 📚 Well-documented source code
- Python 3
- Git
- GitHub
- Visual Studio Code
CodeAlpha_Hangman_Game/
│
├── screenshots/
│ ├── start_game.png
│ ├── playing.png
│ ├── winner.png
│ └── game_over.png
│
├── .gitignore
├── LICENSE
├── README.md
├── requirements.txt
├── hangman.py
└── words.py
- Python 3.x installed on your computer
git clone https://github.com/Helina-Leul/CodeAlpha_Hangman_Game.gitcd CodeAlpha_Hangman_Gamepython hangman.py- The program randomly selects a word.
- The hidden word is displayed using underscores.
- Guess one letter at a time.
- Each incorrect guess adds a part to the hangman drawing.
- You have 6 incorrect attempts.
- Guess all the letters before the hangman is completed to win.
- Choose whether to play another round after the game ends.
This project helped strengthen my understanding of:
- Variables and Data Types
- Lists
- Strings
- Conditional Statements
- Loops
- Functions
- Modular Programming
- Python Standard Library
- User Input Validation
- Problem Solving
- Git and GitHub Workflow
Through this project, I learned how to:
- Design a complete console application
- Organize Python code into reusable functions
- Validate user input effectively
- Implement game logic using loops and conditions
- Track application state
- Manage projects using Git and GitHub
- Write clear documentation for software projects
Internship: CodeAlpha Python Programming Internship
Task: Task 1 – Hangman Game
Potential enhancements for future versions include:
- Multiple difficulty levels
- Larger word database
- Categories (Animals, Countries, Technology, etc.)
- Score tracking
- Hint system
- Colored terminal output
- Graphical User Interface (GUI) using Tkinter or PyQt
- Sound effects and animations
Helina Leul
GitHub: https://github.com/Helina-Leul
This project is licensed under the MIT License.
See the LICENSE file for more information.
If you found this project helpful or interesting, consider giving it a ⭐ on GitHub.
Thank you for visiting this repository!



