My Solution for 3/15


#1

Just wanted to share my code. If you have any questions feel free to ask them.

def is_int (x):
    x = str (x)
    x1 = x.find(".")
    if x1 == -1:
        print ("It's an integer")
        return True
    x2 = x1 + 1
    x3 = x[x2:]
    x4 = (list(x3))
    i = 0
    for number in x3:
        if number != "0":
            i += 1
    if i > 0:
        print ("It's not an integer")
        return False
    elif i == 0:
        print ("It's an integer")
        return True

#2

import math
def is_int(x):
if x - math.floor(x)==0:
return True
else:
return False


#3

def is_int(x):
if (10*x) % 10 ==0 :
print (10*x) % 10
return True
else:
print (10*x) % 10
return False