For this code I'm receiving the error message: Oops, try again. Your function seems to fail on input -9.5 when it returned 'Nope' instead of '9.5'
However when I replicate it in the Python shell it functions as intended. Is this a bug in exercise?
I know the set answer requires me to enter
if type(arg) == int or type(arg) == float
but my way is still fine right?
def distance_from_zero(arg): if type(arg) == (int or float): return abs(arg) else: return "Nope"