added for comprehension  to P05
added the solution to problem 6