Finished week6 programming assignment with 100 percent correctness