If we are only supposed to solve this problem using knowledge we have acquired so far till this exercise than here is a way I have solved it.
def is_int(x): #store the number as string in variable 'numb' numb = str(x) #split the converted numbers at '.' #store the results in the list rounddownlist = numb.split('.') #The first element in the list above would be our rounded down number #However, we need to convert the rounded down number back to number using int() rounddown = int(rounddownlist) #Use of 'abs' below avoids errors with negative numbers #sample error #Oops, try again. Your function fails on is_int(-3.4). It returns True when it should return False. if (abs(x) - abs(rounddown)) > 0: return False else: return True num1 = -1.0 num2 = 6.3 num3 = 5 num4 = 100.0 num5 = -4.4 print is_int(num1) print is_int(num2) print is_int(num3) print is_int(num4) print is_int(num5)