Review: Built-In Function, distance_from_zero is not defined


#1



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


I feel like I've done everything right, there is probably some simple mistake that i'm making. Whenever I submit my code it says,
"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."
Help is greatly appreciated!


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


#2

Hello !

return abs(13): < do you need a colon at the end here?


#3

here:

def distance_from_zero(13):

function parameters can't be integers, they need to be a valid variable name


#4

A post was split to a new topic: Built in function, distance from zero


#5

Thanks so much! It has been awhile since I completed the earlier sections, that slipped my mind but makes total sense now.


#6