Functions 19. Review Abs() error

Excercise 19. Review: Built-in Functions

Keep getting an error that it returns nope instead of 10 when -10 is entered

def distance_from_zero(v):
    if type(v) == 'int' or type(v) == 'float':
       # print "%s"%(abs(v))
        return abs(v)
           return "Nope"


Did you try without quotes on int and float?


I did and that works thanks Alot :slight_smile: