My function isnt being defined


I have defined a function called distance_from_zero. For some reason in the area where you input the code, its not appearing as if it is defined.

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


The code block needs to be indented.


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