Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started