Review: Built-In Functions (Help)


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)
        return "Nope"


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


you are right. it was a glitch.