Hellrocker

test123

Mar 8th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. word = input("Enter the word: ")
  2. chances = input("Chances allowed:")
  3. dash_list = []
  4. word_list = []
  5.  
  6. for i in word:
  7. word_list.append(i)
  8.  
  9. for i in range(len(word)):
  10. dash_list.append('_')
  11.  
  12. for i in range(int(chances)):
  13. guess_char = input("Guess the character: ")
  14.  
  15. for n, j in enumerate(word_list):
  16. if guess_char == j:
  17. dash_list[n] = guess_char
  18.  
  19. print(' '.join(dash_list))
Add Comment
Please, Sign In to add comment