Import Numpy As NP
Import Numpy As NP
def step_function(x):
return 1 if x >= 0 else 0
class Perceptron:
def __init__(self, input_size, learning_rate=0.1, epochs=100):
self.weights = np.zeros(input_size + 1)
self.learning_rate = learning_rate
self.epochs = epochs