def __init__(self, logger=RealLogger()): self.logger = logger self.matrix1 = MatrixOperations.make_from_list([[0] * 3] * 3) self.matrix2 = MatrixOperations.make_from_list([[0] * 3] * 3) self.rows = 3 self.answer = '' self.operation = '+' self.logger.log('Welcome!')
def update_matrix2_content(self, content): self.matrix2 = MatrixOperations.make_from_list(content) self.logger.log('Setting second matrix to %s' % self.matrix2.data_lines)
def __init__(self): self.matrix1 = MatrixOperations.make_from_list([[0]*3]*3) self.matrix2 = MatrixOperations.make_from_list([[0]*3]*3) self.rows = 3 self.answer = '' self.operation = '+'
def update_matrix1_content(self, content): self.matrix1 = MatrixOperations.make_from_list(content) self.logger.log('Setting first matrix to %s' % self.matrix1.data_lines)
def update_matrix2_content(self, content): self.matrix2 = MatrixOperations.make_from_list(content)