Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Hangman Game

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.


📖 Project Overview

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.


✨ Features

  • 🎲 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

🛠️ Technologies Used

  • Python 3
  • Git
  • GitHub
  • Visual Studio Code

📂 Project Structure

CodeAlpha_Hangman_Game/
│
├── screenshots/
│   ├── start_game.png
│   ├── playing.png
│   ├── winner.png
│   └── game_over.png
│
├── .gitignore
├── LICENSE
├── README.md
├── requirements.txt
├── hangman.py
└── words.py

🚀 Getting Started

Prerequisites

  • Python 3.x installed on your computer

Clone the Repository

git clone https://github.com/Helina-Leul/CodeAlpha_Hangman_Game.git

Navigate to the Project Folder

cd CodeAlpha_Hangman_Game

Run the Game

python hangman.py

🎮 How to Play

  1. The program randomly selects a word.
  2. The hidden word is displayed using underscores.
  3. Guess one letter at a time.
  4. Each incorrect guess adds a part to the hangman drawing.
  5. You have 6 incorrect attempts.
  6. Guess all the letters before the hangman is completed to win.
  7. Choose whether to play another round after the game ends.

📸 Screenshots

Game Start

Game Start


Gameplay

Gameplay


Winning the Game

Winner


Game Over

Game Over


🧠 Concepts Practiced

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

🎯 Learning Outcomes

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 Information

Internship: CodeAlpha Python Programming Internship

Task: Task 1 – Hangman Game


🔮 Future Improvements

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

👩‍💻 Author

Helina Leul

GitHub: https://github.com/Helina-Leul


📄 License

This project is licensed under the MIT License.

See the LICENSE file for more information.


⭐ Support

If you found this project helpful or interesting, consider giving it a ⭐ on GitHub.

Thank you for visiting this repository!

About

Console-based Hangman Game built with Python for the CodeAlpha Python Programming Internship.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages