Apr-03-2019, 08:44 PM
thanks for the explanation, but your code applied to my case still returns a single value.
I have tried to work with the indentations more but that's the outcome I am getting.
I have tried to work with the indentations more but that's the outcome I am getting.
def f(balance,r,A,n): r=5.0 A=1000.0 n=6 balance=10000 L=[] for year in range(n): balance=(balance)*(r/100.0 +1)- A L.append(year) return L print(L)