Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Hangman Game

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.


๐Ÿ“– Project Overview

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.


โœจ Features

  • ๐ŸŽฒ 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

๐Ÿ› ๏ธ Technologies Used

  • Python 3
  • Random Module
  • Time Module
  • OS Module



๐ŸŽฎ Gameplay

  1. Launch the game.
  2. Press Enter to start.
  3. Guess one letter at a time.
  4. Correct letters appear in their positions.
  5. Incorrect guesses reduce your remaining lives.
  6. Win by revealing the complete word before your lives reach zero.

๐Ÿ’ป Example

Word: _ _ _ _ _
Lives: โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ

Guess a letter: a

โœ… Correct Guess!

Word: a _ _ _ _
Lives: โค๏ธโค๏ธโค๏ธโค๏ธโค๏ธโค๏ธ

๐Ÿ“š Python Concepts Practiced

  • Variables
  • Data Types
  • Lists
  • Strings
  • Loops
  • Conditional Statements
  • User Input
  • Random Module
  • Functions
  • Input Validation
  • Basic Game Logic

๐Ÿš€ Future Improvements

  • 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

๐Ÿค Contributing

Contributions, suggestions, and improvements are always welcome.

  1. Fork the repository.
  2. Create a new branch.
  3. Commit your changes.
  4. Open a Pull Request.

๐Ÿ‘จโ€๐Ÿ’ป Powered By

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!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages