title: Inheritance and Printing in Bank account in python
body: <p>This is a section from my bank account code, i am new to OOP and have added some inheritance to my code, the trouble i am having is with printing the balance with interest, when i print it I get the same value as the regular balance without interest, give your insight.</p>
  
  <pre><code>from random import randint
  
  
  class BankAccount(object):
      def __init__(self, initial_balance=0):
          self.balance = initial_balance
      def deposit(self, amount):
          self.balance += amount
      def withdraw(self, amount):
          self.balance -= amount       
      def get_balance(self, initial_balance, rate):
          return self.get_balance() * self._rate
  
  class BankAccountWithInterest(BankAccount):
    def __init__(self, initial_balance=0, rate=0.1):
       BankAccount.__init__(self, initial_balance)
       self._rate = rate           
    def interest(self):
       return self.balance * self._rate
  
  
  balance = (randint(100, 500))
  my_account = BankAccount(balance)
  my_interest = BankAccountWithInterest(balance)
  print(my_account.balance)
  print(my_interest.balance)
  </code></pre>