Chapter 2 exercises for Python for Informatics