safe eval used

This commit is contained in:
Soham-KT 2024-10-06 13:50:36 +05:30
parent aa66c4b48c
commit d44d0a810f

View File

@ -135,14 +135,15 @@ if __name__ == "__main__":
testmod() testmod()
# func, a, b = get_inputs() func_str, a, b = get_inputs()
# acc = 1 acc = 1
# solution = None solution = None
# while acc <= 100_000: func = safe_function_eval(func_str)
# table, h = compute_table(func, a, b, acc) while acc <= 100_000:
# add = apply_weights(table) table, h = compute_table(func, a, b, acc)
# solution = compute_solution(add, table, h) add = apply_weights(table)
# acc *= 10 solution = compute_solution(add, table, h)
acc *= 10
# print(f'Solution: {solution}') print(f'Solution: {solution}')