Built in Func. error: "1 instead of Nope"


#1

Ok so I included a picture of my code so that everyone can see that I checked all the indents.
as far as I am concerned I got everything done right. So i do not know why it says that the syntax in line 1 has errors/ "Your function seems to fail on input True when it returned "1" isntead of "Nope"
code:

def distance_from_zero(n0
if type(n) == int or type(n) == float:
return abs(n)
else:
return "Nope"

`


#2

Remember that in Python, blocks always begin with :.


#4

Hey @scriptcoder34418.

This seems to be a simple enough error. The error thrown references the end of your definition line, on line 2. @mtf is more or less correct. You MUST place a ":" at the end of your definition. Otherwise, you will receive a similar error to the one you received in this lesson. So, your code is almost flawless, except for that. Good luck.


#5

Thanks, I can't believe I missed something so simple.... and spent a whole day over lol.... >.<