udemy-ultimate-python, chapter 4, exercise 2.