diff options
| -rw-r--r-- | fun_math/__init__.py | 0 | ||||
| -rw-r--r-- | fun_math/e.py | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/fun_math/__init__.py b/fun_math/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/fun_math/__init__.py diff --git a/fun_math/e.py b/fun_math/e.py new file mode 100644 index 0000000..5b44ef8 --- /dev/null +++ b/fun_math/e.py @@ -0,0 +1,15 @@ + +import matplotlib.pyplot as plt +import math + + +def fn(n): + return (1+1/n)**n + + + +if __name__ == '__main__': + + plt.plot(range(1, 500), list(map(fn, range(1, 500))), marker='.') + plt.hlines(y=math.e, xmin=0, xmax=500, ls='dashed', color='gray') + plt.show() |
