https://github.com/abdullahmuhammed5/hangman
Famous hangman game with python
https://github.com/abdullahmuhammed5/hangman
hangman hangman-game python3
Last synced: 9 days ago
JSON representation
Famous hangman game with python
- Host: GitHub
- URL: https://github.com/abdullahmuhammed5/hangman
- Owner: AbdullahMuhammed5
- Created: 2020-12-30T18:25:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-31T21:12:23.000Z (almost 5 years ago)
- Last Synced: 2025-02-15T10:14:07.137Z (8 months ago)
- Topics: hangman, hangman-game, python3
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Hangman Game
This is a program that implement the famous hangman game, with python3.
```
Hint: the words you should guess is a name for programming language (;
```
## Get started
You should have python3 installed on your machine.
1. Clone my repository
```
git clone https://github.com/AbdullahMuhammed5/hangman.git
```
2. Navigate to the app directory
```
cd hangman
```
3. Run the program
```
python3 app.py
```
Now you can play around with the program and you can use the examples below as a references
## Example 1:
```
H A N G M A N
Type "play" to play the game, "exit" to quit: > play
----------
Input a letter: > a
-a-a------
Input a letter: > i
-a-a---i--
Input a letter: > o
That letter doesn't appear in the word
-a-a---i--
Input a letter: > o
You've already guessed this letter
-a-a---i--
Input a letter: > p
-a-a---ip-
Input a letter: > p
You've already guessed this letter
-a-a---ip-
Input a letter: > h
That letter doesn't appear in the word
-a-a---ip-
Input a letter: > k
That letter doesn't appear in the word
-a-a---ip-
Input a letter: > a
You've already guessed this letter
-a-a---ip-
Input a letter: > z
That letter doesn't appear in the word
-a-a---ipt
Input a letter: > t
-a-a---ipt
Input a letter: > x
That letter doesn't appear in the word
-a-a---ipt
Input a letter: > b
That letter doesn't appear in the word
-a-a---ipt
Input a letter: > d
That letter doesn't appear in the word
-a-a---ipt
Input a letter: > w
That letter doesn't appear in the word
You lost!
Type "play" to play the game, "exit" to quit: > exit
```
## Example 2:
```
H A N G M A N
----
Input a letter: > j
j---
Input a letter: > i
That letter doesn't appear in the word
j---
Input a letter: > +
Please enter a lowercase English letter
j---
Input a letter: > A
Please enter a lowercase English letter
j---
Input a letter: > ii
You should input a single letter
j---
Input a letter: > ++
You should input a single letter
j---
Input a letter: >
You should input a single letter
j---
Input a letter: > g
That letter doesn't appear in the word
j---
Input a letter: > a
ja-a
Input a letter: > v
You guessed the word java!
You survived!
```