Changed file grid.py  to contain homework 3 solutions