I'm trying to write a Python class that creates a matrix of zeros, then uses a random number generator to pick 'seats' on the matrix. It changes the zero in that seat to a one, until the matrix is all ones. Can someone critique/correct my code? (I also want the 'agent' to check its surroundings on the matrix, and try 3 times to find a seat that is 2 seats away from any ones.)import randomimport numpy as np#cs is grid size or seats, ns is number of agentsclass Seats():    def __init__(self, cs, ns):        self.cs = cs        self.ns = ns         self.seats = np.zeros([self.cs, self.cs],dtype=int)      def foundseat(self):        foundseat = False                 tries = 0        while foundseat == False and tries <= 3:            x = random.randint(0, self.cs)            y = random.randint(0, self.cs)            if self.seats[x][y] < 1:                self.seats[x][y] = 1                foundseat = True            else:                 tries += 1   def goodseat(self, x,y):    empty_neighbors = 0    for neighbor_x in range(x-1,x+1):        for neighbor_y in range(y-1,y+1):           if self.seats[neighbor_x][neighbor_y] == 0:                empty_neighbors = empty_neighbors + 1
Picking seats in a matrix
python;beginner;matrix;numpy