I'm working on programming a very simple perceptron in Python without a threshold, and I'm using the sigmoid function but I need a clear guideline to follow, I have a confusion in how to construct the output.

```
Input = [(1,1,0), (0,1,0),(1,1,1),(0,0,1)]
weights = [0,0,0]
output = sigmoid(input)
sigmoid = 1.0/(1.0 + exp(- Input)
sigmoid_derative = sigmoid * (1.0 - sigmoid)

```

I didn’t test the code in python , but it's just a mind storm as I learnt fro the lecture. But I'm not sure when I use the sigmoid\_derative? 
I understand that the activation function will have 2 parts:

1. Adder: `newInput= w1x1 + w2x2 + w3x3`
2. `sigmoid = 1.0/(1.0 + exp(- newInput)`

Then we will have the error function in order to know if the weights are accurate.

```
Error = 0.5 * (Target - Output)* (Target- Output)
if Error == 0 then Break;
else
Update weights.

```