Question: Write a Python script to simulate a savings account over the course of 3 months. Your program should perform the following steps 3 times (once
Write a Python script to simulate a savings account over the course of 3 months. Your program should perform the following steps 3 times (once for each month). Note: we have not covered Python loops yet; you may simply copy-paste the code for one month three times.
You may choose any starting balance for the account. The example uses $100
- Print the balance of the account at the beginning of the month
- Round value to two decimal places (hint: use string formatting %.2f)
- Add a random value between $100 and $500
- Your solution must use the random module
- Add 3% compounding interest to the account
At the end of your program; print the final balance after 3 months
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
