the wordindex variable will be set to random index for the list passed as the wordlist parameter line will return the element in wordlist at the integer index stored in wordindex let' pretend ['apple''orange'grape'was passed as the argument to getrandomword(and that randint( returned the integer that would mean that line would evaluate to return wordlist[ ]and then evaluate to return 'grapethis is how the getrandomword(returns random string in the wordlist list so the input to getrandomword(is list of stringsand the return value output is randomly selected string from that list this will be useful for the hangman game to select secret word for the player to guess displaying the board to the player nextyou need function to print the hangman board on the screen it will also display how many letters the player has correctly (and incorrectlyguessed def displayboard(hangmanpicsmissedletterscorrectletterssecretword) print(hangmanpics[len(missedletters)] print(this code defines new function named displayboard(this function has four parametershangmanpics list of multi-line strings that will display the board as ascii art (the global hangmanpics variable will be passed for this parameter missedletters string of the letters the player has guessed that are not in the secret word correctletters string of the letters the player has guessed that are in the secret word secretword string of the secret word that the player is trying to guess the first print(function call will display the board hangmanpics will be list of strings for each possible board hangmanpics[ shows an empty gallowshangmanpics[ shows the head (when the player misses one letter)hangmanpics[ shows head and body (when the player misses two letters)and so on until hangmanpics[ which shows the full hangman the number of letters in missedletters will reflect how many incorrect guesses the player has made call len(missedlettersto find out this number soif missedletters is 'aetrthen len('aetr'will return printing hangmanpics[ will display the appropriate hangman board for misses this is what hangmanpics[len(missedletters)on line evaluates to post questions to