Lesson 2 is_even Pl help where is the problem


My code is as below.

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


the remainder of even numbers is zero, not sure why you compare with int



if x % 2 == int:

is a little off. The modulus function, dividend % divisor, produces the remainder. So if you want to determine whether the number is even, your remainder should be 0.