Code for problem 1 and 2
Fix some bug in questions 2 and completed question 3
Problem 4 of assignment 1
Assignment 1 Q1 and Q2