Create class SavingsAccount.
Each object of the class contains 3 instance variables: name - the name of the account holder, savings_balance - indicating the amount the saver currently has on deposit, interest_rate - the annual interest rate to be applied to this account.
The class should have the following methods:
The contructor__init__should take in three parameters as specified in the following
method header statement:
def_init_(self, name=", savings_balance = 0, interest_rate=0);
Thecalculate_monthly_interest method calculates the monthly interest by multiplying the savings_balance by interest_rate divided by 12 - this interest should be added to savings_balance.
The header for the method should be defcalculate_monthly_interest(self):
The get_name method which returns the name of the account holder and has the following method header:
def get (name(self) :
The get_balance method which returns the current savings_balance and has the following header:
The main method to test class SavingsAccount.
Instantiate two SavingsAccount objects, saver1 and saver2.
saver1 will be created with a name of Fred Smith, a balance of $2000.00 and an interest rate of .04.
saver2 will be created with a name of Sue Jones, a balance of $3000.00 and an interest rate of .04.
Calculate the monthly interest for 12 months and print the new balances for both savers.
The output should be displayed as a columnar table and all dollar amounts should be displayed to two decimal places.
The display of the column headings should use the get_name function to get the savers names.
The display of the account balances should use the get_balance function.
The main method has the following header:
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.class SavingsAccount:
def __init__(self, name='',savings_balance=0,interest_rate=0):
self.name = name