Unfortunately there is not an easy way to do this. If you use raw_input(), like you said, everything becomes type unicode. Input(), however takes everything as straight python code, this works fine if all we are inputting is numbers, but if we enter letters or words, we have issues. You can enter your letters or words with quotes so python recognizes them as strings, but that is not practical.
The best that I could come with uses a second function to check if the string can be converted to float. If it can, that function will return True, if not False. We can use that output in our main function and simply convert the unicode to float if the first function returns True.
print distance_from_zero(raw_input("enter a number:"))