These two exercises is a copy from @CoreyMSchafer's code snippets which he use in Python Tutorial: Unit Testing Your Code with the unittest Module.