I need help on this python


I don't get what is wrong with this it is giving my this error message

File "python", line 1
def distance_from_zero(numb)
SyntaxError: invalid syntax

here is my code

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


Remember to open the block with a colon.

def my_func(n):


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