Compound interest calculations

from blog lmno.lol @alvaro, | ↗ original
Saving Tony Bedford's python snippets for calculating compound interest. Really just an excuse to fire up Emacs and play with org babel. t = 20 # years r = 0.07 # rate pv = 200000.00 # present value fv = pv * (1+r)**t # future value print("Pension of %.2f at %d%% will be worth %.2f in %d years" % (pv, 100 * r, fv, t)) #+RESULTS: Pension of...