Perceptron Learning Algorithm Python