Name Error: Distance_from_zero is not defined


#1



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

Hey, I've been stuck on this all day. I've literally copied and pasted code and nothing seems to work.  

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

I keep getting a name error saying distance_from_zero is not defined. I've tried putting it in a variety of ways but nothing seems to work. Any suggestions?


#2

That is an error, also.

print

All keywords are lowercase.


#3

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