예제 #1
0
def ChikaTestDivisibleBy7(string):
    if (len(string) <= 2):
        if (StringIsInt(str(divide(int(string), 7)))):
            return True
        else:
            return False
    else:
        LastDigit = string[-1]
        RemainingString = string[0:(len(string) - 1)]
        Result = int(RemainingString) + (5 * int(LastDigit))
        return ChikaTestDivisibleBy7(str(Result))
    return False
예제 #2
0
def DivisibleBy9(string):
    StrAdd = DigitAddition(string)
    if (StringIsInt(str(divide(StrAdd, 9)))):
        return True
    else:
        return False
예제 #3
0
def DivisibleBy8(string):
    if (StringIsInt(str(divide(int(string[-3:]), 8)))):
        return True
    else:
        return False
예제 #4
0
def DivisibleBy4(string):
    if (StringIsInt(str(divide(int(string[-2:]), 4)))):
        return True
    else:
        return False
예제 #5
0
def DivisibleBy2(string):
    if (StringIsInt(str(divide(int(string[-1]), 2)))):
        return True
    else:
        return False