0

Quien me puede ayudar a pasar este codigo a python?

https://code.sololearn.com/cinuHRtnwBmj/?ref=app

10th May 2020, 5:18 AM
Esteban Carbono
Esteban Carbono - avatar
5 Respuestas
+ 7
On another note: I'd recommend looking into http://commons.apache.org/proper/commons-math/userguide/linear.html instead of reinventing the wheel. Unfortunately it's not possible to use external api's/frameworks for Java on the playground, but might come in handy anyways.
13th May 2020, 7:54 AM
Tashi N
Tashi N - avatar
+ 6
Yes, a regular matrix Oma Falk This is how the values are generated, basically incremented under certain conditions. n is the input dimension p=2;k=1;c=1; while(k<=2*n-1) { if(k<=n) { for(j=1;j<=k;j++) { M[k-j+1][j]=c; c++; } } else { for(j=p;j<=n;j++) { M[n-j+p][j]=c; c++; } p++; } k++; }
13th May 2020, 7:49 AM
Tashi N
Tashi N - avatar
+ 3
dim= int(input() ) matrix = [[0 for i in range(dim)]for j in range(dim)] for r in matrix: print(*r) follow up soon coming....
13th May 2020, 7:03 AM
Oma Falk
Oma Falk - avatar
+ 3
Esteban Carbono can u explain rule how to fill the matrix?
13th May 2020, 7:12 AM
Oma Falk
Oma Falk - avatar
+ 2
Tashi N Denise Roßberg bildet Esteban eine ganz normale Matrix?
13th May 2020, 7:05 AM
Oma Falk
Oma Falk - avatar