๐ฎ Hangman Game in Python
A simple and interactive command-line Hangman game built using Python. Test your vocabulary skills by guessing the hidden word before you run out of chances! ๐
๐ Overview
The Hangman Game is a beginner-friendly Python project that randomly selects a word from a predefined list and allows the player to guess it one letter at a time. The player has a limited number of attempts to reveal the complete word.
โจ Features
โ
Random word selection from a predefined list
โ
Interactive command-line gameplay
โ
Displays hidden letters using underscores (_)
โ
Updates the word after every correct guess
โ
Tracks remaining attempts
โ
Win/Loss detection system
โ
Beginner-friendly Python logic
โ
Uses loops, conditions, lists, and string manipulation
๐ ๏ธ Technologies Used
- ๐ Python 3
- ๐ฒ Random Module
- ๐ป Command Line Interface (CLI)
๐ Project Structure
๐ฆ Hangman-Game
โฃ ๐ Hangman_game.py
โ ๐ README.md
๐ How to Run the Project
1๏ธโฃ Clone the Repository
git clone https://github.com/missalishbadilawar-ops/Hangman-Game-CodeAlpha.git
2๏ธโฃ Navigate to the Project Folder
cd Hangman-Game
3๏ธโฃ Run the Program
python Hangman_game.py
๐ฏ Game Rules
๐ A random word is selected by the program.
๐ The player guesses one letter at a time.
๐ Correct guesses reveal the letter's position in the word.
๐ Incorrect guesses reduce the remaining turns.
๐ The player wins if all letters are guessed before turns run out.
๐ The player loses when all turns are exhausted.
๐ฅ๏ธ Example Gameplay
Welcome to Hangman!
Word to guess: _ _ _ _ _ _
Turns left: 6
Guess a letter: p
Good job! 'p' is in the word.
Word to guess: p _ _ _ _ _
Turns left: 6
๐ง Concepts Covered
- ๐ While Loops
- ๐ Random Selection
- ๐ Lists
- ๐ String Operations
- ๐ฏ Conditional Statements
- ๐ User Input Handling
- ๐ข Iteration with Enumerate()
๐ Future Improvements
- ๐จ Add ASCII Hangman Graphics
- ๐ Sound Effects
- ๐ Multiple Difficulty Levels
- ๐ Score Tracking System
- ๐ค Larger Word Database
- ๐พ Save & Load Game Progress
- ๐ฅ๏ธ GUI Version using Tkinter or PyQt
๐ค Contribution
Contributions are welcome! ๐
- Fork the repository ๐ด
- Create a new branch ๐ฟ
- Commit your changes ๐พ
- Push to your branch ๐
- Open a Pull Request ๐ฅ
๐ Known Limitations
โ ๏ธ Duplicate letter validation is not yet implemented.
โ ๏ธ Only a small predefined word list is available.
โ ๏ธ Single-player mode only.
๐จโ๐ป Developer:
_ALISHBA DILAWAR -
_
โญInternship
This project was build during the CodeAlpha Python Programming virtual internship


Log in or sign up for Devpost to join the conversation.