Code with the Programming Assigment 2