Apr-07-2019, 12:58 PM
(Apr-07-2019, 12:00 PM)mcgrim Wrote: All I am trying to do is to calculate A, how large does it need to be in order for the last element
of the list to be either 0 or a negative number?
This will tell you the balance after n years:
def f(balance, r, A, n): for year in range(n): balance = balance * (r / 100.0 + 1) - A return balanceIf you want to calculate A such that the balance is positive using this, you would need to run it with different values of A until you got a positive balance.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures