what is the problem for my code,confused

def is_even(x):
if x % 2 == 0:
return True
return False


anybody can help me ,thank you very much!


This is supposed to be a utility function that returns a boolean to a simple question. We would never expect user input in the transaction, unless it is before the function call. x is already a parameter that is a value passed in to the function. That line can be safely removed.


thank you very much,i made a very stupid mistakeļ¼


Like we all do. For the sake of your sanity, forget you ever knew what an adjective is. The less we apply them to ourselves, the better chance of being who we really are. Love and relish mistakes. They are the building blocks of success.


yea! I nedd the mistake to remind myself ,so 'Love and relish mistakes!!!' thank you again1


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