I got the following error messages:
"Oops, try again. 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"
And also the error message in the top right window:
File "python", line 1
SyntaxError: invalid syntax
I don't understand what's wrong with my code. I went through many topics and none of them can solve my problem. I have been stuck here for a couple of days and can't go through, very frustrated. Can someone help?
def distance_from_zero(n) if type(n)==int or type(n)==float: return abs(n) else: return "Nope"