Skip to content

Instantly share code, notes, and snippets.

@mahasak
Last active September 22, 2018 05:52
Show Gist options
  • Save mahasak/6c60af3532028de04fd899259992539a to your computer and use it in GitHub Desktop.
Save mahasak/6c60af3532028de04fd899259992539a to your computer and use it in GitHub Desktop.
hangman-challenge-1
def hangman(secret_word, letters):
max_score = 7
return max_score - len([ch for ch in letters if ch not in secret_word]) > 0
secret = "bigbears"
tries = ['a','b', 'c', 'd', 'e', 'f', 'g', 'h']
print(hangman("bigbears",tries))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment