Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 503 Bytes

README.md

File metadata and controls

44 lines (28 loc) · 503 Bytes

Python-Projects-Hangman 🐍

This repo contains python code that simulates playing hangman.
Run the code.

Simple version

Python

# Write your code here
print("H A N G M A N")


words = ['python', 'java', 'kotlin', 'javascript']


guess = input("Guess the word: ")



if guess not in words:
    print("You lost!")
else:
    print("You survived!")

Output

Guess the word:
python
You won!

Challenging version

Python

Output