Of all the programs that you could write, one that handles money is where mistakes cost the most. This project is a small bank with two kinds of account, and transfers that either happen completely or not at all. It brings together inheritance with an abstract base class, properties to protect the balance, the decimal module so that cents are exact, and a context manager that undoes a transfer that fails halfway.
More lessons in Complete Python Programming