2
私はユーザーから与えられた2つの行列を乗算するプログラムを作りたいと思います。私は、最初の行列の行を入力するユーザーをし、辞書のキーは、行の番号で、辞書に各行を保存したい。あなたはそれを使用するためにn個を変換する必要がありPythonで行列を掛けている、raw_inputのエラーがあります
print "this program computes the product of two square matrices with real entries"
n = raw_input("Enter number of columns=Number of rows")
rowsofmatrix1={}
columnsofmatrix2={}
for i in range (1,n+1):
rowsofmatrix1[i]=raw_input("Enter row number"+str(i)+"of the first matrix as a list")
for j in range (1,n+1):
columnsofmatrix2[j]=raw_input("Enter column number"+str(j)+"of the second matrix as a list")
print rowsofmatrix1
ああ、私は気づいていません...私はちょうどraw_inputの代わりに入力を入れます。ありがとう – Diego