K Health interview question

implement a simple logistic regression algorithm