checking if the player has won check if the player has won foundallletters true for in range(len(secretword))if secretword[inot in correctlettersfoundallletters false break how can the program know if the player has guessed every letter in the secret wordwellcorrectletters has each letter that the player correctly guessed and secretword is the secret word itself but you can' just check if correctletters =secretword because consider this caseif secretword was the string 'otterand correctletters was the string 'orte'then correctletters =secretword would be false even though the player has guessed each letter in the secret word the only way you can be sure the player won is to iterate over each letter in secretword and see if it exists in correctletters ifand only ifevery letter in secretword exists in correctletters will the player have won if you find letter in secretword that doesn' exist in correctlettersyou know that the player has not guessed all the letters the new variable foundallletters is set to true on line before the loop begins the loop starts out assuming that all the letters in the secret word have been found but the loop' code on line will change foundallletters to false the first time it finds letter in secretword that isn' in correctletters won!' if foundalllettersprint('yesthe secret word is "secretword '"you have gameisdone true if all letters in the secret word have been foundthe player is told they have won and gameisdone is set to true when the player guesses incorrectly elsemissedletters missedletters guess this is the start of the else-block rememberthe code in this block will execute if the condition was false but which conditionto find outpoint your finger at the start of the else keyword post questions to