Last active
September 22, 2018 05:52
-
-
Save mahasak/6c60af3532028de04fd899259992539a to your computer and use it in GitHub Desktop.
hangman-challenge-1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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