Question: My code is already given in image and instructions are also give please fix this according to instructions. def series(n_terms=1000): Estimate e with series: s

My code is already given in image and instructions are also give please fix this according to instructions.
My code is already given in image and instructions are also give
please fix this according to instructions. def series(n_terms=1000): """Estimate e with series:
s = (1/1 + 1/1 + 1/(1*2) + 1/(1*2*3) IT I DE

def series(n_terms=1000): """Estimate e with series: s = (1/1 + 1/1 + 1/(1*2) + 1/(1*2*3) IT I DE S = def limit(n_limit=1000): """Estimate e with limit:""" 1 = (1 + 1) ^n HER B We briefly used another contant, also called Euler's number(e), which is the base of the natural logarithm and comes up very often in scientific formulas (e.g. Optimal Stopping, our classwork example) Just like , the constant e is transcendental, but its numerical value can be estimated by various methods. In this homework assignment we are going to use two alternative approximations. Series Approximation 00 e = 3+=++++++ 1 1.2 1 .+... 1.2.3 RO As you can see, you need to iteratively calculate a sum up until a given number of steps (n). Limit (Bernoulli) 11 (1+-)" n eslim 00 With this method, you need to evalute a mathematical expression with a given (n) paramter. Implement the series function, based on the formula above. First, remove the pass statement, and replace it with your algorithm. Do not forget to return the result. (40 pts) Implement the limit function, based on the formula above. First, remove the pass statement, and replace it with your algorithm. Do not forget to return the result. (40 pts) Add a small test program to the end of the file, but make sure your test code runs only if the script is executed at the top level (hint: programming idiom, as discussed in the Lecture). Your test code should print out the following output (use your own functions to calculate the results) (20 pts): a name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!