0
Quien me puede ayudar a pasar este codigo a python?
5 odpowiedzi
+ 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.
+ 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++;
}
+ 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....
+ 3
Esteban Carbono
can u explain rule how to fill the matrix?
+ 2
Tashi N Denise Roßberg
bildet Esteban eine ganz normale Matrix?