Review: Built in functions


#1



https://www.codecademy.com/courses/python-beginner-c7VZg/4/3?curriculum_id=4f89dab3d788890003000096#


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)
    else:
        return "Nope"


#2

Everything should be lowercase.


#3

Thank you ! does it requires to be lowercase ?


#4

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.


#5

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