python 3.5 : quit a if loop (or other loops) : <p>When running the program, the user is asked to input a number. If the number is 1, quit the program. If the number is not 1, print the number. </p>

<p>I wonder how to realize this. </p>

<p>I am using python 3.5.</p>

<p>My code is like this. I always get an error: <code>'break' outside loop</code></p>

<p>How can I fix this?</p>

<pre><code>x = input('Please input a number: ')
if x == '1':
    print('quit')
    break
else:
    continue
print(x)
</code></pre>
