13.2. Save Your MoneyΒΆ

For this assignment, we will practice writing a while loop with a selection construct.

Since you will be well paid after graduating from college, let’s say that you invest $1,000 at the beginning of each month. At the end of each month, you are paid interest on your investment. The interest rate paid depends on the account balance. The annual rate is

\spalignsys{0 < balance \leq 10000: 1 \%;
10000 < balance \leq 15000: 2 \%;
15000 < balance \leq 30000: 3 \%;
30000 < balance \leq 1000000: 5 \%;
100000 < balance \.: 7 \%}

Note that these are annual interest rates, not monthly rates. After the interest has been paid for each month, your script should print the month number, the interest paid, and the current balance. The program should run until you have more than 1 million dollars.