...

/

Code the Perceptron Output

Code the Perceptron Output

We'll cover the following...
Press + to interact
def weighted_sum(a,b):
output = 0
for i in range(len(a)):
output += (a[i] * b[i])
return output
def perceptron(input, weights):
pred = weighted_sum(input,weights)
return pred
weights = [1, 1]
input = [2,3]
output = perceptron(input, weights)
print(node_0_value)

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy