What is wrong with this code


def distance_from_zero(thing):
if type(thing) == int or type(thing) == float:
return abs(thing)
return "Nope"

this code is not working why


What does it do differently from what you want? "wrong" doesn't contain that information!
And make sure that we can see the intact code, yours seem to have lost a few things in your post.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.