
def mp_neuron(inputs, weights,threshold):
    threshold = 2 
    output = []
    for (x1,x2) in inputs:
        total = x1*weights[0]+x2*weights[1]
        output.append(1 if total >= threshold else 0)
    return list(output)

inputs = [(0, 0), (0, 1), (1, 0), (1, 1)]
expected  = [0, 0, 0, 1] 
weights = [1,1]

print("AND Gate")
threshold = 2
print("Actual Output: ", expected)
print("Predicted Output:", mp_neuron(inputs, weights, threshold))



