Skip to content

Added a README.md file #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions H/hangman_game/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Hangman Game

This is a simple command-line Hangman game in Python. Try to guess the hidden word letter by letter. You have a limited number of lives to use, and if you run out of lives before guessing the word correctly, you lose. If you guess the word before running out of lives, you win!

# How to Play

- Run the script using a Python interpreter.
- You will be given a word to guess, represented by underscores ('\_') that match the length of the word.
- You have 6 lives to start with.
- Enter a letter as your guess.
- If the letter you guessed is in the word, the letter will be revealed.
- If the letter you guessed is not in the word, you will lose a life.
- You cannot guess the same letter twice.
- Keep guessing letters until you:
- Guess the word correctly and win the game.
- Run out of lives and lose the game.

# Prerequisites

- Python 3.x
- Required Python modules: random