level: beginner
why do i get error \"can\'t multiply sequence by non-int of type \'float\'\"?
def nestEgVariable(salary, save, growthRates): Sav
In this line:
fund = fund * (1 + 0.01 * growthRates) + depositPerYear
I think you mean this:
fund = fund * (1 + 0.01 * i) + depositPerYear
When you try to multiply a float by growthRates (which is a list), you get that error.