Name Error: Distance_from_zero is not defined


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)
        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?


That is an error, also.


All keywords are lowercase.


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