Building a blind guessing game
secret_word="carrt"
guess=""
guess_count =0
limit= 3
out_of_guessess=False
while guess != secret_word and not(out_of_guessess):
if guess_count < limit:
guess=input("Enter the guess")
guess_count +=1
else :
out_of_guessess=True
if out_of_guessess:
print("Out of guesses")
else:
print("Winner")
Comments
Post a Comment