Question: using python Instructions While you are saving the world in your assignment, we'd like you to also think about other forms of saving. To start


using python
Instructions While you are saving the world in your assignment, we'd like you to also think about other forms of saving. To start this off, we will look at saving money. You will be given a starting balance and an interest rate. You will then calculate the balance you would have after each of the first nine years after putting your money into savings. Details Input Input consists of an positive integer representing the initial balance (named balance) an positive integer representing the interest rate (named RATE) Processing You will need calculate the balance after each of the next ten years. The first year has been done for you. Output The first three lines of output have been taken care of for you (years 0 through 2). You will modify code so that you output the balance for years 0 through 9 in the form: {year number} {rounded balance after that many years} Sample input/output: Input 1000 Output 0 1100 1 1210 2 1331 3 1464 4 1611 5 1772 6 1949 7 2144 8 2358 9 2594 10 pod2.py New 1 ## 2 # CSCI 1105 3 # Week 7, POD 2 4 # @author: ?? 6 balance = int(input) 7 RATE = int(input) 9 year = 0 10 print(year, round(balance) 12 year = 1 13 balance = balance + balance - RATE / 100 14 print(year, round(balance)) 16 year = 2 17 balance = balance + balance * RATE / 100 18 print(year, round(balance) 19
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
