Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

from accounts import BankAccount def balances(): print(' #### Balances of All Accounts#### ') total = 0 for i in range(len(my_accounts)): print(Name: , my_accounts[i].name, tNumber: ,

image text in transcribed

from accounts import BankAccount def balances(): print(' #### Balances of All Accounts#### ') total = 0 for i in range(len(my_accounts)): print("Name: ", my_accounts[i].name, "\tNumber: ", my_accounts[i].num, \ "\tBalance: ", my_accounts[i].bal) total = total + my_accounts[i].bal print("\t\t\t\t\tTotal: ", total) print(' #### Bank Accounts #### ') my_accounts = [] # add code for tasks here balances()
Modify testAccounts.py to: 1. Create an account "Savings", a/c number "100000-1", balance $1000 2. Create an account "Everyday", alc number "100000-2", balance $100 3. Add both accounts to the my_accounts list 4. Print the balances of the accounts 5. Deposit $100 into the Savings account 6. Withdraw $10 from the Everyday account 7. Withdraw $1000 from the Everyday account 8. Calculate and apply the interest on both accounts 9. Deduct (annual) fees from both accounts 10. Print the balances of the accounts 11. Add exception handling to withdraw() in accounts.py and around each withdrawal in testAccounts.py. Modify testAccounts.py to: 1. Create an account "Savings", a/c number "100000-1", balance $1000 2. Create an account "Everyday", alc number "100000-2", balance $100 3. Add both accounts to the my_accounts list 4. Print the balances of the accounts 5. Deposit $100 into the Savings account 6. Withdraw $10 from the Everyday account 7. Withdraw $1000 from the Everyday account 8. Calculate and apply the interest on both accounts 9. Deduct (annual) fees from both accounts 10. Print the balances of the accounts 11. Add exception handling to withdraw() in accounts.py and around each withdrawal in testAccounts.py

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_2

Step: 3

blur-text-image_step3

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

More Books

Students also viewed these Databases questions

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago