2. is even


#1

I'm having a problem with my code too, although it is a bit different:

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

It is saying that the second lie has invalid syntax, how do I fix it?


2 is even
#2

a single equal sign is assign a value, you can't assign a value of zero to remainder of x % 2

use two equal signs to compare the remainder with zero


#3

Thank you that helped!!!:slight_smile: