must be done using a while loop with nested statements Write a Python program that calculates the value of an investment with interest compounding annually. The program should allow the user to enter the beginning balance and the interest rate. This interest rate should be entered as a decimal number. For example, it should be entered as .05, instead of 5%. The program should output a table of the balance for each year. It should stop when the balance has tripled. It should also display when the balance has doubled. Be sure to right-align and format the year and balance numbers as shown in the samples below. Also, don’t forget to include your header and step comments in your code. Your program should function like this … Sample 1
** must be done using a while loop with nested statements
Write a Python
should allow the user to enter the beginning balance and the interest rate. This interest rate should be entered as a
decimal number. For example, it should be entered as .05, instead of 5%. The program should output a table of the
balance for each year. It should stop when the balance has tripled. It should also display when the balance has doubled.
Be sure to right-align and format the year and balance numbers as shown in the samples below. Also, don’t forget to
include your header and step comments in your code.
Your program should function like this …
Sample 1
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images