ответ на Python:
from random import randint
a = [[randint(10,90) for i in range(7)] for i in range(7)]
[print(*i) for i in a]
print('4:')
c = [[i for i in j] for j in a]
for i in range(1,6):
c[i][-i-1] = 99
c[2][5] = c[3][5] = c[4][5] = c[5][5] = c[5][2] = c[5][3] = c[5][4] = c[4][3] = c[4][4] = c[3][4] = 99
[print(*i) for i in c]
print('5:')
for i in range(7):
c[i][3] = c[3][i] = 99
c[1][2]=c[2][1]=c[2][2]=c[1][4]=c[2][4]=c[2][5]=c[4][4]=c[4][5]=c[5][4]=c[4][2]=c[4][1]=c[5][2]=99
Объяснение:
очень надеюсь что пробелы будут
ответ на Python:
from random import randint
a = [[randint(10,90) for i in range(7)] for i in range(7)]
[print(*i) for i in a]
print('4:')
c = [[i for i in j] for j in a]
for i in range(1,6):
c[i][-i-1] = 99
c[2][5] = c[3][5] = c[4][5] = c[5][5] = c[5][2] = c[5][3] = c[5][4] = c[4][3] = c[4][4] = c[3][4] = 99
[print(*i) for i in c]
print('5:')
c = [[i for i in j] for j in a]
for i in range(7):
c[i][3] = c[3][i] = 99
c[1][2]=c[2][1]=c[2][2]=c[1][4]=c[2][4]=c[2][5]=c[4][4]=c[4][5]=c[5][4]=c[4][2]=c[4][1]=c[5][2]=99
[print(*i) for i in c]
Объяснение:
очень надеюсь что пробелы будут