Last active
July 22, 2016 15:11
-
-
Save richardbwest/28cb2c7292d01428e90340e922acb21c to your computer and use it in GitHub Desktop.
This file contains 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 getALetter(): | |
global lives | |
global usedLetters | |
letter = input("please enter a letter") | |
if not len(letter) == 1: #Have they entered only 1 character? | |
mainScreen() | |
elif not letter.isalpha(): #Is that character a letter? | |
mainScreen() | |
elif in usedLetters: # Have they already guessed that letter? | |
mainScreen() | |
else: | |
usedLetters.append(letter) #if not, add it to the list of used letters | |
if not letter in chosenWord: #Have the guessed correctly? | |
lives = lives - 1 # If not, lose a life! | |
mainScreen() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment