Question: Please take a look at my python code for a word guessing game and add any changes to improve it , only a few changes.

Please take a look at my python code for a word guessing game and add any changes to improve it, only a few changes. Explain what each change is and specifically write where it should go in the code. Thank you!
Rest of the code that wouldnt fit in picture:
"is in the word")
letter_guesses.add(guess)
else:
print("The letter", guess, "its not in the word.")
attempts +=1
else:
print ("Input is invalid. Only guess the whole word or a single letter.")
if '_' not in mask_word(secret_word, letter_guesses):
print("Congrats! You discovered the word", secret_word, "with", attempts, "guesses")
break
if__name__== "main":
game ()
 Please take a look at my python code for a word

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!