Integer to Binary Conversion
<p>I'm calculating the conversion from an integer to a binary number wrong. I entered the integer 6 and got back the binary number 0. which is definitely wrong. Can you guys help out? I'm using python 3 by the way. </p>

<pre><code>def ConvertNtoBinary(n):

    binaryStr = ''
    if n &lt; 0:
        print('Value is a negative integer')

    if n == 0:
        print('Binary value of 0 is 0')
    else:
        if n &gt; 0:
            binaryStr = str(n % 2) + binaryStr
            n = n &gt; 1
    return binaryStr

def main():
    n = int(input('Enter a positive integer please: '))
    binaryNumber = ConvertNtoBinary(n)
    print('n converted to a binary number is: ',binaryNumber)

main()
</code></pre>
