Review: Built-In Functions (Help)


#1

I just got stuck in the review: built in functions section.

For some reason it keeps giving me indentation error on the "else:" any idea whats going on?

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

#2

seems fine? Try refreshing the page or a different browser, you could have hit a glitch.

If neither of those work, can you upload a screenshot if your code + output window?

do please add a function call:

print distance_from_zero(10)

so you can see what is happening


#3

you are right. it was a glitch.

Thanks!


#4