You are on page 1of 1

# -*- coding: utf-8 -*-

"""
Created on Fri Oct 9 21:59:29 2020

@author: NARESH
"""

w1 = 4
w2 = 5
b1 = 1
def nm1(x1,x2):
#x1(0,1)
#x2(0,1)
if w1*x1+w2*x2-1<0:
return 1
else:
return 0
w3 = 1
w4 = 1
b2 = 2
def nm2(x1,x2):
if w3*x1+w4*x2-b2<0:
return 0
else:
return 1

#print(nm1(0,0))
#print(nm1(0,1))
#print(nm1(1,0))
#print(nm1(1,1))

print(nm2(0,0))
print(nm2(0,1))
print(nm2(1,0))
print(nm2(1,1))

You might also like