MSBC Group interview question

Write code for training a linear classifier.