Lecture 7 Exercise 2: Perceptron learning algorithm