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) else: return 'Nope'