Help about Built in functions(19/19)


Hello people, this is my code but it is not working. Can anyone help?

def distance_from_zero(j):
return distance_from_zero
if type(j) is int:
return abs(j)
if type(j) is float:
return abs(j)
return “Nope.”



You can’t return a function inside of itself!


first, please always mention the error details

the text below def line should be indented ; but more important there is no if statement before the return statement like in other lines - you first if … something and then if condition is true you execute the return statement. so you have missed something from the instruction


You can’t return at the beginning of your function, every code after return in function won’t be executed.