Convert from decimal to Binary function
<p>I tried creating a function to convert to binary the long way but i keep getting a very basic error that i can't seem to figure out. Would appreciate an extra pair of eyes.</p>

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

    if (-1.0 &lt; n &lt; 256.0):
        number_list = []
        while (n != 0):
            rem = n % 2
            number_list.append(rem)
            n = n // 2

        new_list = number_list[::-1]
        print("".join(str(x) for x in new_list))

    else:
       print("Invalid input")
</code></pre>

<p>the error i keep getting is:</p>

<p><code>File "", line 13
    else :
       ^
SyntaxError: invalid syntax</code></p>

<p>I'd really appreciate any feedback. Thanks</p>