Single layer perceptron code and gives examples