PS2 - Regression python code