J.P. Morgan Interview Question

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