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"
letterguesses.addguess
else:
printThe letter", guess, "its not in the word."
attempts
else:
print Input is invalid. Only guess the whole word or a single letter."
if not in maskwordsecretword, letterguesses:
printCongrats You discovered the word", secretword, "with", attempts, "guesses"
break
ifname "main":
game
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
