homework for Learning From Data MOOC (week 1, exercise 7-10)