Write a Python program that keeps track of a bank account balance. Ask the user for the annual interest rate, the starting balance, and the number of months of which to keep track. Check that each of these is a positive value and allow the user to enter a new value until a positive value is entered (do this for all invalid inputs).
A loop should iterate for each month and complete each of the following:
Ask the user for the amount deposited into the account that month.
Deposit amount should not be negative and should be added to the account balance.
Keep a running total of deposit amounts.
Ask the user for the amount withdrawn from the account that month.
Withdrawal amount should not be negative and should be subtracted from the account balance.
Keep a running total of withdrawal amounts.
Check for a negative account balance.
If balance is negative, exit the loop and print a message for the user stating that the account has been closed due to the negative balance.
Calculate the monthly interest using the annual interest rate divided by 12 and multiplied by the account balance.
Monthly interest should be added to the account balance after deposits and withdrawals for the month have been added.
Keep a running total of interest earned.
Print a summary for the month which includes amount deposited, amount withdrawn, interest earned, current balance.
After the loop finishes, the program should print the final account balance as well as the deposit, withdrawal, and interest totals; this should complete the program.
Remember to display monetary values using a dollar sign and two decimal places.