x = [] y = [] a = 1 x1 = 3 x2 = 7 for xi in range(2, 9): yi = a * (xi - x1) * (xi - x2) x.append(xi) y.append(yi) print(x) print(y)