Added chap6.py and chap7.py files with code.