19. Review: Built-in Functions || Help Please



File "python", line 1
def distance_from_zero(dfz)

SyntaxError: invalid syntax

Oops, try again. It looks like you have a NameError. Maybe you forgot to create a function called distance_from_zero? Check the error message for more info! - global name 'distance_from_zero' is not defined

Well, I don't understand when it says 'distance_from_zero is not defined' as I have defined it.

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


at the end of a function declaration should be a colon to mark the start of the function content:

def example(parameter):

the colon (:) is missing in your case


That would be a good reason as to why it won't work. Thank you