19. Built-in Funtions


#1


The Code is still working, but I can not finish the lesson.
The Error: Oops, try again. It looks like you have a TypeError. Make sure your function should only take one input. (Or check the error message for more info.) - 'builtin_function_or_method' object has no attribute 'getitem'

def distance_from_zero(r):
    if r == type(int) or r == type(float):
        return abs(r)
    else:
        return abs[str('Nope')]


#2

check your code here.remember what you want to do here is check if r is an int or float.

check your code here. Is the code correct? Are you using the abs function correctly? Can that function be used on strings?


#3

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