J.P. Morgan interview question

How to implement linear regression on python (from scratch)?