Question: I want these code to be converted in python from c++. Question 33: Write a C++ program to evaluate the integral of f(x)=vx* + 1


![+ 1 over [0,2] with 10 subintervals using the Composite Trapezoidal rule.](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f30f398969c_17766f30f3926951.jpg)
I want these code to be converted in python from c++.
Question 33: Write a C++ program to evaluate the integral of f(x)=vx* + 1 over [0,2] with 10 subintervals using the Composite Trapezoidal rule. Use a user defined C++ function for evaluating f(x) at the different modes (1.e. for finding the values off at the different nodes). #includeiostream> #include using namespace std; double fval(double x) { double y = sqrt(x*x + 1); return y } int main { int n.) double h. sum. 1, x0, xn, xc, fx0, fxn, fxc; Input Section // cout> XO; cout> xn; cout>n; Processing Section // finding step size h = (xn- x0): fx0 = fval(x0); fxn = fval(n) I = fx0+ fxn; X = XO: sum = 0.0 ; for(j=1 ; j #include using namespace std; int main() { int n. double h , sumi, sum2, 1, x0, xn, xc, fx0, fxn, fxc; Input Section cout> x0; cout>n; cout> Processing Section // finding step size h = (xn- x0; fx0 = sqrt(x0*x + 1); fxn = sqrt(xnxn + 1); I = PxOxn; XC = 0; sumi = 0.0 ; sum2 = 0.0 ; for(j=1 ; j #include using namespace std; int main() { int n. double n, sumi, sum2, 1, x0, xn, xc, fx0, fxn, fxc; Input Section cout> XO; cout> xn: cout>n; Processing Section // finding step size h = (xn- x0y : fx0 = sqrt(x6*x + 1); fxn = sqrt(xnxn + 1); I = fx0+ fxn; XC = 0; sumi = 0.0 ; sum2 = 0.0 ; for(j=1 ; j