Python - dividing a user input to display a range of answers
<p>I'm having problems with a Python question. The question is to write a function that shows all integers that are cleanly divisble by 13 in the range of (1:x) where x is a user input. 
I'm new to Python and am struggling with this question. I need to have a user input which Python then divides by 13 and displays the answer(s). So, if a user inputs '27', the answers would be '13' and '26'. </p>

<p>My code so far is: </p>

<pre><code>    x = int(raw_input('Enter your Number Here: '))
    def divide(x):
cond = True
while cond:
    x % 13 == 0
    print x
else:
    cond = False
    print 'Your number us not divisble by 13'

    divide(x)
</code></pre>

<p>Borrow the back-ported print function Python 3:</p>

<pre><code>from __future__ import print_function
</code></pre>

<p>The following will print all numbers in the range [1..x] inclusive</p>

<pre><code>print([y for y in range(1,x+1,1) if y%13==0])
</code></pre>

python python-2.7 python-3.x