python-practice-book problem answer