from simple import SIMPLE problem = SIMPLE((1, 2), (0.7, 0.5), 0.02, 120) problem.prep() error = 1 iteration = 0 while error > 10 ** -7: iteration += 1 problem.iterate() error = problem.avg_error() print(f'Iteration {iteration}') print(f'Avg error: {error}') if iteration % 5 == 0 or iteration == 1: problem.plot(True, 2)