Wrote code for Ass1/Prob3.