Please help 19/19


#1

PLEASE HELP

def distance_from_zero(n):
INDENTif type(n) == int or type(n) == float:
INDENTINDENTreturn abs(n)
INDENTelse: "Nope"

This keeps telling me that my value is returning none on the input True when it should be nope

what does this mean please help me


#2

@ellisader,

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

print distance_from_zero("a")
print distance_from_zero(True)
print distance_from_zero(20.000)