Review: Built in functions


i want to get out from this error
Oops, try again.
Your function seems to fail on input True when it returned '1' instead of 'Nope'

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


Everything should be lowercase.


Thank you ! does it requires to be lowercase ?


The instructions says to make a function called distance_from_zero. The tests will assume that the function name is exactly that. Outside, you can name your function however you want! It all comes down to keeping it consistent.


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