User:Ping/Python Perceptron

The code below defines two classes: Perceptron (which produces a floating-point output) and BooleanPerceptron (which produces a Boolean output). Internally, a bias input is built-in by appending an extra 1 to the given inputs.