Answered step by step
Verified Expert Solution
Link Copied!

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")
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 ()
image text in transcribed

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions