solution for Assignment-4.

solution for Assignment-4