19/19 help me


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


Hi yoojinhwa,
This is what worked for me.
Hopefully it helps!

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


Everything in your function should be the same as the argument. since the argument is NUM, then it should be if type(NUM) and so on. you dont put in a number to test until you close the function. Here is my code for example

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

Hope that helps

Also forgive the -'s, i cant figure out how to format indents on this lol.


you may need indentation for if statement


if you want to do your code you would have to make it
'type(NUM)' not 'type(2)'