Learning Scientific Programming with Python (2nd edition)

P4.6.1: Modifying the BankAccount class

Question P4.6.1

(a) Modify the base BankAccount class (Section 4.6.2 of the book) to verify that the account number passed to its __init__ constructor conforms to the Luhn algorithm described in Exercise P2.5.3.

(b) Modify the CurrentAccount class to implement a free overdraft. The limit should be set in the __init__ constructor; withdrawals should be allowed to within the limit.