if statment not responding (python)
<p>the if statement is not responding. I'm trying to get the <code>gcd(20,6)</code>
the program outputs: <code>gcd(20,6): 20=6(4) + -3</code>, I need it to be if the last number(-3) is less than 0 the the program should output <code>20=6(3) + 3</code>,but the if statement isn't responding. thanks</p>

<pre><code>rnumtup = (20, 6)
if rnumtup[0] &gt; rnumtup[1]:
    x= rnumtup[1]
    y =rnumtup[0]
w = x / y
w = round(w)
z = x - (y*w)
z = round(z)

while z != 0:
    x = y
    y = z
    w = x / y
    w = round(w)
    z = x - (y*w)
    z = round(z)
    if z &gt; 0: #not responding
        #some statements
    if z &lt; 0: #not responding
        #some statements
</code></pre>

<p>I figured out an alternative, thanks guys :)</p>

<pre><code>rnumtup = (20, 6)
if rnumtup[0] &gt; rnumtup[1]:
    x= rnumtup[1] 
    y =rnumtup[0] 
w = x / y 
w = round(w) # Does nothing
z = x - (y*w) 
z = round(z) 

if z&lt; 0:
    w = x / y
    w = round(w)
    w = w-1
    z = x - (y*w)
    z = round(z)

while z != 0:
    x = y # x = 6
    y = z # y = 2
    w = x / y # w = 3
    w = round(w) # Does nothing
    z = x - (y*w)
    if z&lt; 0:
        w = x / y
        w = round(w)
        w = w-1
        z = x - (y*w) 
    z = round(z)
</code></pre>

python