else return guess def playagain() this function returns true if the player wants to play againotherwise it returns false print('do you want to play again(yes or no)' return input(lower(startswith(' ' print(' ' missedletters ' correctletters ' secretword getrandomword(words gameisdone false while true displayboard(hangmanpicsmissedletterscorrectletterssecretword let the player type in letter guess getguess(missedletters correctletters if guess in secretword correctletters correctletters guess check if the player has won foundallletters true for in range(len(secretword)) if secretword[inot in correctletters foundallletters false break if foundallletters print('yesthe secret word is "secretword '"you have won!' gameisdone true else missedletters missedletters guess check if player has guessed too many times and lost if len(missedletters=len(hangmanpics displayboard(hangmanpicsmissedletterscorrectletterssecretword print('you have run out of guesses!\nafter str(len(missedletters)missed guesses and str(len(correctletters)correct guessesthe word was "secretword '"' gameisdone true