1
Good night! I’m trying to create a tabuada program using for and matrix, my code is like this at the moment:
def crie_array(rows, columns, value):
matriz = []
for i in range(linhas):
linha = []
for j in range(colunas):
valor = i*j
linha.append(valor)
matriz.append(linha),"\n"
return matriz
A = crie_matrix(11,11,11) print(A)
It works the problem is that in the Console I’m only getting the results of multiplication, when in fact what I want is to receive:
[1 x 1 = 1] [1 x 2 = 2] [1 x 3 = 3] [1 x 4 = 4] [1 x 5 = 5] [1 x 6 = 6] [1 x 7 = 7] [1 x 8 = 8] [1 x 9 = 9] [1 x 10 = 10]
This is what I want to receive, but not only from the table of 1, but from the table of 1. Someone can help me.
Thank you so much for the help, it worked super well! Vlw my friend.
– Wallace