doing exercises from the book, Introduction to Programming Using Python by Liang