Compound Growth
rates[i] is the percent your savings grew in year i (it can be negative). Return the overall multiplier after all years as a float: the product of 1 + rate / 100 for every year. Hint: np.prod.
Example 1
rates [10,10]
returns 1.2100000000000002
1.1 * 1.1 = 1.21.
Constraints
1 <= len(rates) <= 30-100 <= rate <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Count BetweenEasy
- Count IncreasesEasy
- Count Sign ChangesEasy
- Drop Lowest AverageEasy
- Empty SeatsEasy
- Fill MissingEasy
- First Day Over LimitEasy
- Full ColumnsEasy