Kernel: Python 3 (Anaconda)
Programming concepts Introduced using Python and a simple actuarial example
Arithmetic: addition (+), subtraction (-), division (/), and multiplication (*)
In [7]:
0.6000000000000001
In [2]:
In [3]:
8.982585006242244
In [4]:
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-4-532c08013ec5> in <module>()
----> 1 a(0,10)
<ipython-input-2-02cd6a5a876f> in a(i, n)
1 def a(i,n):
----> 2 return (1-(1+i)**-n)/i
ZeroDivisionError: float division by zero
In [0]: