7/19


#1

Hello,everyone.
this is my code and I can't find the error:

def distance_from_zero(a):
if type(a) == int or float:
return abs(a)
else:
return 'Nope'

Please help,thanks!

Update:
I have solved this problem,just replace the line 2 with the sentence in hint.
so type(a)== int or float is illegal in python.