コード例 #1
0
ファイル: numpersistence.py プロジェクト: Splint/Python-PPA
def main():
    userInput = digi.userInputChecker("Enter an integer: ")
    arr = splitInput(userInput)
    print

    additive_root = additivePersistence(arr)
    multiplicative_root = multiplicativePersistence(arr)
    
    print
    print
    print "Summary for the integer %d" % userInput
    print "\t Additive Persistence %d, Additive Root %d" % (PERSISTENCE_ADD_COUNT, additive_root)
    print "\t Multiplicative Persistence %d, Multiplicative Root %d" % (PERSISTENCE_MUL_COUNT, multiplicative_root)
コード例 #2
0
def main():
    userInput = digi.userInputChecker("Enter an integer: ")
    arr = splitInput(userInput)
    print

    additive_root = additivePersistence(arr)
    multiplicative_root = multiplicativePersistence(arr)

    print
    print
    print "Summary for the integer %d" % userInput
    print "\t Additive Persistence %d, Additive Root %d" % (
        PERSISTENCE_ADD_COUNT, additive_root)
    print "\t Multiplicative Persistence %d, Multiplicative Root %d" % (
        PERSISTENCE_MUL_COUNT, multiplicative_root)
コード例 #3
0
ファイル: latinsquares.py プロジェクト: Splint/Python-PPA
def main():
    inp_int = digi.userInputChecker("How big do you want the square? ")
    inp_top_left = digi.userInputChecker("What number do you want at the top left? ")
    
    makeLatinSquare(inp_int, inp_top_left)
コード例 #4
0
ファイル: latinsquares.py プロジェクト: louissock/Python-PPA
def main():
    inp_int = digi.userInputChecker("How big do you want the square? ")
    inp_top_left = digi.userInputChecker(
        "What number do you want at the top left? ")

    makeLatinSquare(inp_int, inp_top_left)