Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 22, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/09cc28f7e2abb9136326da32f589807b to your computer and use it in GitHub Desktop.
Save amankharwal/09cc28f7e2abb9136326da32f589807b to your computer and use it in GitHub Desktop.
while lives > 0:
print(clue)
print('Lives left: ' + heart_symbol * lives)
guess = input('Guess a letter or the whole word: ')
if guess == secret_word:
guessed_word_correctly = True
break
if guess in secret_word:
update_clue(guess, secret_word, clue)
else:
print('Incorrect. You lose a life')
lives = lives - 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment