Im sort of new to python, and I have been looking at some tutorials, manuals, etc. and I saw how to find prime numbers, so I thought it would be a good place to start, so I added some stuff to hopefully allow for user input, and it doesnt work.
>>> z=input('please enter the lowest number to search for prime numbers from')
if z<=1:
z=2
print "low value changed to 2"
>>> y=input('please enter the highest number to search for prime numbers to')
>>> for n in range(z, y):
for x in range(z, n):
if n % x == 0:
break
else:
# loop fell through without finding a factor
print n, 'is a prime number'
What am I doing wrong?