Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

def isWordGuessed(secretWord, lettersGuessed):

'''
secretWord: string, the word the user is guessing
lettersGuessed: list, what letters have been guessed so far
returns: boolean, True if all the letters of secretWord are in lettersGuessed;
False otherwise
'''
# FILL IN YOUR CODE HERE...
Flag = 1
TempWordList = [secretWord]

for i in range(0,len(secretWord)):
Flag = Flag * int(lettersGuessed[i] in TempWordList)

return bool(Flag)

You might also like