The matrix represents cell points. If we imagine these cell points being a grid, we need to make the values within the matrix equal to the input T1 in quadrants 2 and 4 and the values input T2 for quadrants 1 and 3. As in, from row 0 to 2 and column 0 to 3 it should be the value T1. Also, I need to make this appear as cells, with lines in between all rows/columns.
#input values needed
A = input("Enter a value for the first heater/cooler temp: ")
B = input("Enter a value for the second heater/cooler temp: ")
T1 = input("Enter a value for the first initial plate temp: ")
T2 = input("Enter a value for the second initial plate temp: ")
#the stabilizing criterion value
matrix = []
for row in range(0,6):
matrix.append([])
for column in range(0,9):
matrix[row].append(column)
for row in matrix:
print(row)
matrix[row][column] = T1for the particular range of rows and columns that you need.rowandcolumn. You can check if a particular value ofrowandcolumnfalls within the desired range, and if so, setmatrix[row][column]toT1orT2, whichever. Does that make sense?matrix[0][3]refers to the value stored in a particular position of the matrix. Since you have initialized it to take values of row and column,row in matrix[0][3]checks if the value ofrowis in the value stored atmatrix[0][3]. If you need to check certain positions, you can check ifrowfalls in the range 0 to 3:if row in range(3)and then set it to your desired value accordingly.