Build regularization models by using Lasso(least absolute shrinkage and selection operator)

Build regularization models by using Lasso(least absolute shrinkage and selection operator) .

Extend Lasso model fitting to big data that cannot be loaded into memory. You will fit solution paths for linear or logistic regression models penalized by Lasso over a grid of values for the regularization parameter lambda.

I attached an exercise, you can follow a similar format. It is easy. I also posted some code I have done so far, and after the line 9 there has shows error, your welcome to correct me. Thank you so much to work for it.