Solution Review: Implement a Banking Account
This review provides a detailed explanation of the 'Implement a Banking Account' challenge.
We'll cover the following...
Solution #
Press + to interact
class Account:def __init__(self, title=None, balance=0):self.title = titleself.balance = balanceclass SavingsAccount(Account):def __init__(self, title=None, balance=0, interestRate=0):super().__init__(title, balance)self.interestRate = interestRate
Explanation
-
In lines 2 – 4, we have defined two instance variables,
title
and ...