Input -->[10,20,30,40,50]  
Desired Output  ---> [10,19.21,56.51,110.83,181.14] 
 
**Calculation**  
10-->10  
20-->20*exp(-0.04)  
30-->30*exp(-0.04)+((30*exp(-0.04))*exp(-0.04))  
40--->40*exp(-0.04)+((40*exp(-0.04))*exp(-0.04))+(((40*exp(-0.04))*exp(-0.04))*exp(-0.04)))
Attaching calculation table for easy understanding
Please help me to write function to resolve the above issue using R and python code

                        
Not sure how to do this in
Rbut it is pretty straightforward inPython. You will neednumpyfor this in order to get the exponential of-0.04.