Skip to content

Latest commit

ย 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Python Hangman Game

A simple Hangman word guessing game built with Python.

This project was created as a beginner Python project to practice fundamental programming concepts such as loops, conditions, lists, user input, strings, and the random module.

๐Ÿ“Œ Features

  • ๐ŸŽฒ Randomly selects a word from a word list
  • โค๏ธ Player starts with 6 lives
  • ๐Ÿ”ค Guess the word one letter at a time
  • ๐Ÿชฆ Displays Hangman stages based on remaining lives
  • โœ… Keeps track of correctly guessed letters
  • โŒ Prevents losing a life for invalid multi-character input
  • ๐Ÿ† Displays a win or lose message at the end

๐Ÿ› ๏ธ Technologies

  • Python 3
  • random module

๐Ÿš€ How to Run

Make sure Python 3 is installed on your computer.

Clone the repository:

git clone https://github.com/Ramtinexe/python-hangman-game.git

Navigate to the project folder:

cd python-hangman-game

Run the program:

python main.py

๐ŸŽฎ How to Play

  1. Run the program.
  2. The game randomly selects a word.
  3. Guess the word by entering one letter at a time.
  4. Correct guesses reveal the letters.
  5. Incorrect guesses reduce your remaining lives.
  6. You win when you reveal all the letters.
  7. You lose when all 6 lives are used.

๐Ÿ“š What I Practiced

This project helped me practice:

  • Variables
  • Lists
  • Strings
  • if, elif, and else
  • for loops
  • while loops
  • input()
  • len()
  • .lower()
  • .append()
  • in and not in
  • random.choice()
  • f-strings

๐Ÿ”ฎ Future Improvements

Possible improvements for future versions:

  • Add a larger word list
  • Add different word categories
  • Add a score system
  • Add a replay option
  • Add difficulty levels
  • Improve input validation
  • Add a graphical user interface

๐Ÿ‘ค Author

Ramtin

This project is part of my journey learning Python and programming.

About

A simple Hangman word guessing game built with Python.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages