Second Version of SimplePerceptonLearning

In this version I have added in some comments. I have also fixed the problem that in the case of an error with input patter 11 nothing could be done. The problem is now half solved. In cases where the training set (desired output) have a different first and last value (different value for patterns 00 and 11)(example: 0001, 0111, 1010, etc...) then the program will 'learn' how to solve it and fix the weights correctly.
However in cases where the training set for patterns 00 and 11 are the same (example 1001, 0010, 0110, etc) then the system will be caught in an infinite loop. I am still working on it.