Oops, try again. Your function fails on is_int(-2). It returns False when it should return True.
might be a stupid question but why is -x not an integer according to the code?(google said it's an integer)
Replace this line with your code. def is_int(x): if (abs(x)==int): return True else: return False