Lecture 7: Implementation of the Perceptron algorithm