May 2019
Beginner
528 pages
29h 51m
English
AccountLet’s begin with a bank Account class that holds an account holder’s name and balance. An actual bank account class would likely include lots of other information, such as address, birth date, telephone number, account number and more. The Account class accepts deposits that increase the balance and withdrawals that decrease the balance.
AccountEach new class you create becomes a new data type that can be used to create objects. This is one reason why Python is said to be an extensible language
. Before we look at class Account’s definition, let’s demonstrate its capabilities.
Account and DecimalTo use the new Account class, launch your IPython session from the ch10 examples ...
Read now
Unlock full access