Quiz #4

Hey there! This time, the Quiz #4 was only one exercise this time, but this doesn’t  meant it was easy, here is what our teacher ask us for:

  • 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).

Here is the link to the full PFD file where is all the instructions: http://kenscourses.com/tc101winter2016/wp-content/uploads/2016/02/quiz04.pdf

For doing so I visit the Wikipedia article that was added in the PDF so I know what to do. And look for more libraries to include.

Here is my code: https://gist.github.com/batmantec/d19e3ee10e10d52828ec169e4936c04e

Here is a picture of the program running:

quiz4

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