Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word = input("Enter the word: ")
- chances = input("Chances allowed:")
- dash_list = []
- word_list = []
- for i in word:
- word_list.append(i)
- for i in range(len(word)):
- dash_list.append('_')
- for i in range(int(chances)):
- guess_char = input("Guess the character: ")
- for n, j in enumerate(word_list):
- if guess_char == j:
- dash_list[n] = guess_char
- print(' '.join(dash_list))
Add Comment
Please, Sign In to add comment