преобразовать с Паскаля на питон, заранее program Matrix66;
type
matrix = array [1..10,1..10] of integer;
var
a:matrix;
Column, M, N, i, j:Integer;
procedure DelMatrixColumn(var mat:matrix; X:Integer);
var
i:integer;
begin
if x>0 then
begin
N:=N-1;
for j:=X to N do
for i:=1 to M do
mat[i,j]:=mat[i,j+1];
end;
end;
begin
Write('N: ');
Readln(N);
Write('M: ');
Readln(M);
for i:=1 to M do
begin
writeln(i,': ');
for j:=1 to N do
begin
Write(j,' : ');
Read(a[i,j]);
end;
end;
Column:=0;
for j:=1 to N do
begin
i:=1;
while ((i<=M) and (a[i,j]<0)) do inc(i);
if i=M+1 then Column:=j;
end;
DelMatrixColumn(a,Column);
for i:=1 to M do
begin
for j:=1 to N do
begin
Write(' : ',a[i,j]);
end;
writeln(' : ');
end;
end.