Python integer testing
<pre><code>def isinteger(x):
    while x &gt; 0.0:
        x = x - 1.0
    if x &lt; 0.0:
        return 0.0
    elif x == 0:
        return 1.0

d = input('')
print isinteger(d)
</code></pre>

<p>The code is somewhat self explanatory. I'm using it for a fractran interpreter. Here is my problem: I input a fraction, such as 22/7, and I get a 1 as my output. Does it have something to do with python's IO?</p>
