Question: Next, implement the function getGuessedword that takes in two parameters -a string, secreWord, and a list of letters, lettersGuessed. This function returns a string that

 Next, implement the function getGuessedword that takes in two parameters -a

Next, implement the function getGuessedword that takes in two parameters -a string, secreWord, and a list of letters, lettersGuessed. This function returns a string that is comprised of letters and underscores, based on what letters in lettersGuessed are in secretword. This shouldn't be too different from isWordGuessed! Example Usage: > > > secret word = 'apple' > > > lettersGuessed = ['e', 'i', 'k', 'p', 'r', 's'] > > > print (getGuessedWord (secretWord, lettersGuessed)) '_pp_e' When inserting underscores into your string, it's a good idea to add at least a space after each one, so it's clear to the user how many unguessed letters are left in the string (compare the readability of ___ with - - - -).This is called usability - it's very important, when programming, to consider the usability of your program. If users find your program difficult to understand or operate, they won't use it! For this problem, you are free to use spacing in any way you wish- our grader will only check that the letters and underscores are in the For proper order, it will not look at spacing. We do encourage you to think about usability when designing. For this function, you may assume that all the letters in secretWord and lettersGuessed are lowercase. def get GuessedWord (secretWord, letters Guessed): secretWord: string, the word the user is guessing letters Guessed: list, what letters have been guessed so far returns: string, comprised of letters and underscores that represents what letters in secretWord have been guessed so far. FILL IN YOUR CODE HERE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!