Single-Layer Perceptron: Background & Python Code