Chapter 1, questions 1-3 in python