Ericsson interview question

basic machine learning technic code.