+ 3

The determinant of a matrix

https://code.sololearn.com/cr4TJ12tmovk/#py This is my first program. I suppose it looks easy. How I can add "input" function there? Could you give me some advice, please? Some fixes?

25th Nov 2016, 1:39 PM
Daniil Ivanov
Daniil Ivanov - avatar
2 odpowiedzi
+ 4
a = [] n = int(input('Input number of rows: ')) k = int(input('Input number of columns: ')) for i in range(k): a.append([]) for j in range(n): a[i].append(int(input())) print(a)
25th Nov 2016, 7:08 PM
donkeyhot
donkeyhot - avatar
+ 2
the code is good and it's no problem without it it's determinant for third order matrix
25th Nov 2016, 5:47 PM
Sandeep Chatterjee