@@ -0,0 +1,1229 @@
+# https://www.geeksforgeeks.org/newton-forward-backward-interpolation/%0A%0Aimport math%0A%0A# for calculating u value%0Adef ucal(u, p):%0A    %22%22%22%0A    %3E%3E%3E ucal(1, 2)%0A    0%0A    %3E%3E%3E ucal(1.1, 2)%0A    0.11000000000000011%0A    %3E%3E%3E ucal(1.2, 2)%0A    0.23999999999999994%0A    %22%22%22%0A    temp = u%0A    for i in range(1, p):%0A        temp = temp * (u - i)%0A    return temp%0A%0A%0Adef main():%0A    n = int(input(%22enter the numbers of values%22))%0A    y = %5B%5D%0A    for i in range(n):%0A        y.append(%5B%5D)%0A    for i in range(n):%0A        for j in range(n):%0A            y%5Bi%5D.append(j)%0A            y%5Bi%5D%5Bj%5D = 0%0A%0A    print(%22enter the values of parameters in a list%22)%0A    x = list(map(int, input().split()))%0A%0A    print(%22enter the values of corresponding parameters%22)%0A    for i in range(n):%0A        y%5Bi%5D%5B0%5D = float(input())%0A%0A    value = int(input(%22enter the value to interpolate%22))%0A    u = (value - x%5B0%5D) / (x%5B1%5D - x%5B0%5D)%0A%0A    # for calculating forward difference table%0A%0A    for i in range(1, n):%0A        for j in range(n - i):%0A            y%5Bj%5D%5Bi%5D = y%5Bj + 1%5D%5Bi - 1%5D - y%5Bj%5D%5Bi - 1%5D%0A%0A    summ = y%5B0%5D%5B0%5D%0A    for i in range(1, n):%0A        summ += (ucal(u, i) * y%5B0%5D%5Bi%5D) / math.factorial(i)%0A%0A    print(%22the value at %7B%7D is %7B%7D%22.format(value, summ))%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Create newton_forward_interpolation.py (#333)