Ah, ok. After looking it up on the Python documentation,
raw_input() returns a string, not an integer therefore the repeating string makes sense. It's not actually using the input as a number, but as text.
To fix that, either use
input() to have Python 2 convert it to an integer for you or embrace the future and use the
int() function to convert it to an integer.
something = raw_input("Enter a number!")
something = int(something); //reassign as int rather than as string
That will work. (Can also one-line it
something = int(raw_input("Enter a number!")))
Further, looks like at the end it's still the same problem with
How's that work for you?