examples from python programing 3 book