is_int logic not getting. some one please help me out
try with this.......this works well
if x % 1 == 0 or x % 2 == 0:
What you need to get is the numbers after the decimal point and compare it to 0, if it equals 0 return True, else return False.
Here's the code:
a = x % 1
if a == 0: