0
Well, I have a 3x4 matrix and I want to know how to develop a python code to get the highest value of this matrix.
My code made so far was this:
LINHAS = 3
COLUNAS = 4
LINHA_
MatrizM = []
for i in range(LINHAS):
MatrizM.append([])
for j in range(COLUNAS):
n = int(input())
MatrizM[i].append(n)
print('=== MATRIZ M ===')
for i in range(LINHAS):
for j in range(COLUNAS):
print(MatrizM[i][j], end='\t')
print()
What I don’t know is how I can develop a code that shows me the greatest value of this matrix
And if all matrix values are negative?
– Woss
You can do the following, instead of putting control = 0, put control receiving any matrix value, this way the if will work with any value.
– Luigi Azevedo
Then it would be interesting to address this in the answer and make it complete :D
– Woss