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

  1. Print the balance of the account at the beginning of the month
    1. Round value to two decimal places (hint: use string formatting %.2f)
  2. Add a random value between $100 and $500
    1. Your solution must use the random module
  3. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!