19/19 help me


#1

i DON'T KNOW
def distance_from_zero(NUM):
if type(2) == int or type(2)==float:
return abs(2)
else :
return "Nope"


#2

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)
else:
    return "Nope"

#4

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)
----else:
--------return "Nope"
distance_from_zero(2)

Hope that helps

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


#5

you may need indentation for if statement


#6

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