Quiz #4

The instructions: Create a function called euler_calc with a single parameter precision. The value of precision is used to determine when to stop calculating. Your calculation will stop when the two consecutive values estimating e differ by less than precision (remember to use absolute value when calculating the difference between two values here).

The Euler number is very important in the math area and we can calculate it with this formula:

e =  displaystylesumlimits_{n = 0}^{ infty} dfrac{1}{n!} = 1 + frac{1}{1} + frac{1}{1cdot 2} + frac{1}{1cdot 2cdot 3} + cdots

Here you can see my code on Atom

quiz4

quiz41

Also you can check here my code on Github

CC BY-SA 4.0 Quiz #4 by eduardobarrera7 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.