Following the exercises from the book Think Complexity by Allen Downey