Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago