Review: Built-In Functions


The code is correct as far as I can tell. I may be wrong. I get the following error:
Your function seems to fail on input True when it returned ‘1’ instead of ‘Nope’

Any hints as to why it is doing that? Is it a bug or is it me?
Thank you in advance for the help.

def distanceFromZero(z):
  if type(z) == int or type(z) == float:
    return abs(z)
    return 'Nope'


from the instructions:

First, def a function called distance_from_zero

your function has a slightly different name, cammelcase is more JS style, its really uncommon for function names in python



Man thank you again.