Here's what I expect is happening: Say your first guess is low. It skips over the first while loop and goes into the second. Then you guess some more, but one of your later guesses is too high. So it leaves the second while loop, but doesn't go into the third one. That means it exits the main function without asking if they want to play again.
Now note that you only want the third while loop to execute once. If you just want something to execute once, you want an if clause, not a loop.
What you want is one while loop for the game. Then you want to get the guess and use if/elif to check if the guess is high or low. If it's right, you can exit either with an else clause and break, or with the condition of the while loop.
Then you put that while loop into another while loop that continues as long as they want to play again.
Due to the reasons discussed here
we will be moving to python-forum.io
on October 1st, 2016.
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.