Simple Bisection search not giving desired output
<p>Hi all I just started with python programming.
I wrote this general code which would keep bisecting till it finds the correct number. But it aint working . The code keeps hovering inside the block "if guess

<pre><code>num=raw_input("choose a number between 0-100 ")
l=0 #lower limit
u=100 #upper limit
guess=(l+u)/2
print num
print "is it =",guess
while guess!=num:

    if guess==num:
        break

    if guess&lt;num:
        l=guess
        guess=(l+u)/2
        print "guessed low,new guess = ",guess

    elif guess&gt;num:
        u=guess
        guess=(u+l)/2
        print "guessed high,new guess = ",guess
</code></pre>
