I suggest stepping through it with http://pythontutor.com/ (see here)
Each invocation of the function has its own local guess
variable. Changing the value that guess
point to in one function call doesn't change the guess
value anywhere up the stack.