def orGate(x1, x2):
w1, w2, theta= 0.5, 0.5, 0.4
tmp = x1 * w1 + x2 * w2
if tmp <= theta:
return 0
elif tmp > theta:
return 1
print(orGate(1, 1))
print(orGate(0, 1))
print(orGate(1, 0))
print(orGate(0, 0))

def orGate(x1, x2):
w1, w2, theta= 0.5, 0.5, 0.4
tmp = x1 * w1 + x2 * w2
if tmp <= theta:
return 0
elif tmp > theta:
return 1
print(orGate(1, 1))
print(orGate(0, 1))
print(orGate(1, 0))
print(orGate(0, 0))