Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started