chapter 3 python exercises