19.REVIEW Built-in-Functions



The code below returns the following error...
Oops, try again. Your function seems to fail on input True when it returned '1' instead of 'Nope'

Why is this error happening?

def distance_fom_zero(arg):
    if type(arg) == int or type(arg) == float:
        return abs(arg)
        return "Nope"

print distance_from_zero(-4343)


your function:

def distance_fom_zero

the r is missing in from


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