Answer:
import math
e = n = 0
while(round(e, 5) != 2.71828):
e = e + 1/math.factorial(n)
print(n, e)
n = n + 1
Step-by-step explanation:
Above McLaurin series implementation shows that you approximate e to 5 decimals already after 8 iterations.
5.4m questions
7.0m answers