Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("What's the capital of Russia?")
- answer_up = "Moscow"
- answer = answer_up.lower()
- word = ["#" for letter in answer]
- while "#" in word:
- print(*word)
- letter = input("Your letter: ").lower()
- if letter in answer:
- print('Right!')
- for i in range(len(answer)):
- if letter == answer[i]:
- word[i] = answer_up[i]
- else:
- print('Wrong! Try again!')
- print("You win!")
- print("The word is:", answer_up)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement