Machstatz interview question

A python problem statement