Coding answers for assignment for week1