Guest User

Untitled

a guest
Jul 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. 0. 0-10 months: 10USD
  2. 1. 10-20 months: 50USD
  3. 2. 20-30 months: 100USD
  4. 3. 30-40kk months: 130USD
  5. 4. 40-50kk months: 200USD
  6. 5. 50-60kk months: 260USD
  7.  
  8. import numpy as np
  9. import matplotlib.pyplot as plt
  10.  
  11. def situationNmonth(n):
  12. #Returns situation after Nth month.
  13. return np.sum([1000*np.exp(0.05*n/12) for n in range(n)])
  14.  
  15. def myHistory(test):
  16. return [situationNmonth(n) for n in range(60)]
  17.  
  18. def interests(n):
  19. #Returns interest given a month n.
  20. return situationNmonth(n)-n*1000
  21.  
  22. def plotInterests(test):
  23. plt.plot([x for x in range(60)], [interests(n) for n in range(60)])
  24. plt.title("5% interests over 60 months with 1k USD per month.")
  25. plt.show()
Add Comment
Please, Sign In to add comment