def choice2(): given = input("Enter the size of the array to test\n:") A = Array([]) A.newAr(int(given)) # python3 implimentation given = str(input("Enter each Method to test i.e.(1234)\n:")) for i in range(0, len(given)): method = measures(given[i]) method(A)
def choice3(): given = input("Enter the Method # to test\n:") methodNum = int(given) method = measures(given) given = input("Enter the size of the array to test\n:") A = Array([]) m = int(given) A.newAr(m) given = input("Enter the size of the array to estimate\n:") n = int(given) C = method(A) compare = switcher(A, methodNum) expected = compare(C, m, n) print("The expected time for Method #", methodNum, " is %.2f" % expected, "(µs)\n") A.newAr(n) method(A)