Answered step by step
Verified Expert Solution
Link Copied!

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

  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

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

Step: 3

blur-text-image

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

Are my points each supported by at least two subpoints?

Answered: 1 week ago