Perceptron Algorithm Implementation in Python from scratch