Question: python 3 PROBLEM 1: The following program shows the amount of money you will have at the end of every month if you save amount
PROBLEM 1: The following program shows the amount of money you will have at the end of every month if you save amount PerMonth every month for numberOfMonths months in your piggybank assuming you started with the initial sum of initialAmount #piggybank.py # A program that computes the amount of money in your piggybank # by: Susan Computewell initialAmount = float (raw_input('Enter the initial amount : )) amount PerMonth = float (raw_input('Enter the amount saved in each month: ')) numberOf Months = float (raw input('Enter the number of months : )) amount = initial Amount for month in range (numberOf Months+1): print ("month:", month, "amount", "$"+str(amount)) amount = amount + amount Per Month Based on the above example code, write a program that will show the amount that you will have in a bank that offers annual interest in your deposits. The program will ask the user to enter the initial deposit, the interest of the bank, and the number of years. It will then print the amount after each year. An example output is shown below. Enter the initial amount? 100 Enter the interest (as a percentange)? 2 Enter the number of years? 10 Year O amount: $ 100 Year 1 amount: $ 102.0 Year 2 amount: $ 104.04 Year 3 amount: $ 106. 1208 Year amount: $ 108.243216 Year amount: $ 110.40808032 Year amount: $ 112.616241926 Year 7 amount: $ 114.868566765 Year 8 amount: $ 117.1659381 Year 9 amount: $ 119.509256862 Year 10 amount: $ 121.899441999
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
