Original Post
I've been using this tutorial on learning Python http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python/Contents It's a great tutorial, but I'm stuck on one of the exercises. Above they had me create a high_low game with simple code (I'll put it in below), and then in the exercise, they wanted me to take that code and modify it to keep track of how many times the player entered the wrong number. If the number is greater than three times, print "That must have been complicated." I'll show you the main code and the two ways I tried, both are wrong and could use some help on figuring out what my problem is. number = 78 guess = 0 while guess != number: guess = input ("Guess a number: ") if guess > number: print "Too high" elif guess < number: print "Too low" print "Just right" That's the original code number = 78 guess = 0 while guess != number: guess = input ("Guess a number: ") if guess > number: print "Too high" elif guess < number: print "Too low" elif guess > 3 print "That must have been complicated." print "Just right" That was my first attempt and after I ran it I saw the problem, if the number guessed was greater than 3, it would print "Too high" or "Too low" along with "That must have been complicated." number = 78 guess = 0 while guess != number: guess = input ("Guess a number: ") if guess > number: print "Too high" elif guess < number: print "Too low" print "Just right" if guess > 3 print "That must have been complicated." This was my second attempt and I thought it worked, but if you got the correct answer in 1 try it still printed "That must have been complicated." So now I'm stumped, what am I doing wrong? I've wracked my brain trying to figure it out, and I don't know where it is I'm going wrong. Does it have something to do with the guess = 0 at the beginning? *edit* The code was indented in the message, but apparently doesn't show up on the post. :(