Function Not functional


can someone help me please with this code,
it looks like its all good, but this message is keep coming up.

what is wrong with my code here?

a Error message
Oops, try again. Your function seems to fail on input True when it returned '1' instead of 'Nope'

this is my code:

def distanc_from_zero(one):
    if type(one) == int or type(one) == float:
        return abs(one)  
        return "nope"

thanks alot


I believe you meant distance_from not distanc_from


ohh your right!

Thanks :slight_smile:


No problem! :smiley: Happy coding!


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