Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

python 3 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

Students also viewed these Databases questions