class Account:
def __init__(self, title = None, balance = 0):
self.title = title
self.balance = balance
def withdrawal(self, amount):
self.amount = amount
self.balance -= self.amount
def deposit(self, amount):
self.amount = amount
self.balance += self.amount
def getBalance(self):
return self.balance
class SavingsAccount(Account):
def __init__(self, title = None, balance = 0,interestRate = 0 ):
#super().title = title
super().__init__(title,balance)
self.interestRate = interestRate
def interestAmount(self):
return (self.interestRate * self.balance/100)
It seems like I should declare
self.amount = amount
but that is not what was in the solution? Why ?
Thanks
Course: Educative: Interactive Courses for Software Developers
Lesson: Educative: Interactive Courses for Software Developers