A study drill at the end of the chapter asks me to make a function that calls a while loop that will count in an interval decided by the user, but I keep getting an endless loop. If I replace the x with a number, it will end, but if I leave it as x, as far as I can tell, it doesn't register the raw_input() from the user.
def counting_up():
i = 0
numbers = []
print "Where do you want to end?"
x = raw_input(">")
print "How much would you like to increment by?"
a = raw_input(">")
while i < x:
print "At the top, i is %d." % i
numbers.append(i)
i = i + a
print "Numbers now: ", numbers
print "At the bottom, i is %d." % i
print "Your numbers: ", numbers
for num in numbers:
print num
counting_up()