Question: I want these code to be converted in python from c++. Program 09 Newton's Divided Difference Interpolation Question 24: Write a C++ program for the



I want these code to be converted in python from c++.
Program 09 Newton's Divided Difference Interpolation Question 24: Write a C++ program for the Newton's Divided Difference Interpolation. #include using namespace std; // degree of interpolating polynomial #define n 10 int main() { char quit ; int i, j, k ; double ddf[n+1][n+1] , f[n+1], [n+1] ; double xp , fxp , pro; 11- Input Section cout> x[i]; cout> f[i]; cout> XP: Processing Section // Computing zeroth divided differences,f[x_i ] = f_i for(i=0; i> quit ; return 0; } Question 31: Write a C++ program to evaluate the integral of f(x) = Vx2 + 1 over [0, 2] with 10 subintervals using the Composite Trapezoidal rule. #include #include using namespace std; int main() { int n,j: double h , sum , I, x0, xn, xc, fxo, fxn, fxc; -// Input Section cout >> XO; cout> xn; cout>n; 11 Processing Section h = (xn - x0); // finding step size fx0 = sqrt(x0*x0 + 1); fxn = sqrt(xn*xn + 1); I = fxO + fxn; Xc = x0 ; sum = 0.0 for(j=1 ; j