Apr-03-2019, 08:52 PM
Post code that can be run.
I removed the input parameters because in your code they are useless and you don't listen to why, so i just got rid of them.
Added an actual call to the function.
I removed the input parameters because in your code they are useless and you don't listen to why, so i just got rid of them.
Added an actual call to the function.
def f(): 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(f())
Output:[0, 1, 2, 3, 4, 5]