Create Chapter_5.py

python implementation of chapter 5 codes.

Run in a normal console:
> python Chapter_5.py

or in an ipython console (or ipython notebook):
In [1]: %run Chapter_5.py