I am a little bit confused why my answer does not work. I tried it directly on my python setup and it works just fine.
This is what I came up with:
#!/usr/bin/python def distance_from_zero(number): if type(number) == str: return "Nope" else: return abs(number) test=raw_input("Give me something to check: ") print distance_from_zero(test)
This is what made me pass that exercise:
def distance_from_zero(thing): if type(thing) == int or type(thing) == float: return abs(thing) else: return "Nope"