This is what I type below

def distance_from_zero(arg):

if type(arg) == int or float:

return abs(arg)

else:

return "Nope"

And I got error message saying "Oops, try again. Your function seems to fail on input True when it returned '1' instead of 'Nope'"

I looked at other people's answer and the difference between correct answer and mine are in line 2, as the correct answer is

if type(arg) == int or type(arg) == float:

So I now know the correct answer but I was wondering how is my answer (if type(arg) == int or float: ) interpreted as in Python? I just don't understand why can't my answer work...