Completed Homework Assignment with fixed errors