10. Review: Built-In Functions, I don't know what's wrong


this is the co
def distance_from_zero(s):
if type(s) == int(s) or float(s):
return abs(s)
return "Nope"
can someone fix this code?
the error is:
Oops, try again. Your function seems to fail on input True when it returned '1' instead of 'Nope'


you need to do comparison at both sides of the or opetor


did you fix it. i have problems with it too.


if you want help, please make a new topic


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