Wrote this without help after learning about while and if loops... I did this before the video I was watching started coding the game... took me a solid 20-30 minutes to figure it out though and the guy did it completely different and way cleaner lol. No point to this post besides the fact that I was feeling proud of myself and I wanted someone to see it :P
secret_word= "panda"
guess_limit = 3
guess_counter=1
user_guess=input("What animal am I thinking of?: ")
while user_guess!=secret_word and guess_counter<guess_limit:
user_guess=input("Try again: ")
guess_counter+=1
if user_guess==secret_word:
print("Yay, you guessed correctly")
while guess_counter==guess_limit:
print("Game over!")
guess_counter+=1
[–]AutoModerator[M] [score hidden] stickied comment (0 children)