can someone help it doesnt work
def distance_from_zero(10):
return type(10) ==int or type(10) == float:

max(10,11,12,13) # 13
min(10,11,12,13) # 10

abs(10) # 10
abs(-10) #10


The problem is in the method definition you cannot have 10 as the argument but a variable and also the colon at the end of the statement return type(10) ==int or type(10) == float should not be there
try this

def distance_from_zero(n):
    return type(n) ==int or type(n) == float

print distance_from_zero(10)
print distance_from_zero(10.7)
print distance_from_zero("45")

print max(10,11,12,13) # 13
print min(10,11,12,13) # 10

print abs(10) # 10
print abs(-10) #10

or test it here
Click to go to labs


it came up with Oops, try again. Your function seems to fail on input -10 when it returned 'True' instead of '10'


try this

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