Skip to content

Commit 54a22d1

Browse files
committed
Initial commit
1 parent a43a9a8 commit 54a22d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

10.Hangman Game/hangman.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
#10. Guess the Word Game (Hangman):Create a simple version of the Hangman game where the player guesses a word one letter at a time.
2+
13
import random
2-
#,"programming","data","computer","cloud"
34

45
def hangman():
56

6-
words = ["python","algorithm"]
7+
words = ["python","algorithm","programming","data","computer","cloud"]
78
word = random.choice(words).lower()
89
attempts = 6
910
guessed_word = ['_']*len(word)

0 commit comments

Comments
 (0)