'''
15-110 Check 2
Name:
Andrew ID:
'''

import tkinter as tk

################################################################################

'''
#1 - Flow Chart to Program
Parameters: int, int, int
Returns: int
'''

def mysteryFunction(a, b, c):
    return


'''
#2 - drawIllusion(canvas)
Parameters: Tkinter canvas
Returns: None
'''

def drawIllusion(canvas):
    return


'''
#3 - factorial(x)
Parameters: int
Returns: int
'''

def factorial(x):
    return


################################################################################

''' Test Functions '''

def testFlowChart():
    print("Testing mysteryFunction()...", end="")
    assert(mysteryFunction(1, 10, 3) == 3)
    assert(mysteryFunction(1, 8, 3) == 2)
    assert(mysteryFunction(20, 25, 4) == 2)
    assert(mysteryFunction(1, 100, 2) == 50)
    assert(mysteryFunction(7, 11, 6) == 0)
    print("... done!")

def runDrawIllusion():
    print("Testing drawIllusion()... check the screen!")
    root = tk.Tk()
    canvas = tk.Canvas(root, width=400, height=400)
    canvas.configure(bd=0, highlightthickness=0)
    canvas.pack()
    drawIllusion(canvas)
    root.mainloop()
    print("... drawIllusion() closed successfully.")

def testFactorial():
    print("Testing factorial()...", end="")
    assert(factorial(1) == 1)
    assert(factorial(2) == 2)
    assert(factorial(3) == 6)
    assert(factorial(4) == 24)
    assert(factorial(5) == 120)
    assert(factorial(6) == 720)
    assert(factorial(10) == 3628800)
    assert(factorial(0) == 1)
    print("... done!")

def testAll():
    testFlowChart()
    runDrawIllusion()
    testFactorial()

testAll()