Why does the code below produce an infinite loop? If I hard code the value of y to be equal to 10 it doesn't go on forever, yet if I enter 10 through user input it does.
x = 0
y = raw_input("Enter a Number: ")
while x <= y:
x = x + 1
if x %2 == 0:
print x
else:
print "odd"