Решения на первый блок

This commit is contained in:
2025-03-25 12:39:42 +03:00
parent 1e61635a97
commit 7f72988d8b
12 changed files with 280 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
matrix = []
for i in range(10):
matrix.append([0,0,0,0,0,0,0,0,0,0])
#matrix.append([])
# Fill from left-top to right-top
for i in range(10):
matrix[0][i] = i
# Fill from left-top to left-bottom
for i in range(10):
matrix[i][0] = i
# Fill crosshairs
for x in range(1, 10):
for y in range(1, 10):
# Values from left side and top side
l_val = matrix[x][0]
t_val = matrix[0][y]
# Set value on zero-place
matrix[x][y] = l_val * t_val
for line in matrix:
for el in line:
if el >= 10:
print(f'{el} ', end='')
else:
print(f'{el} ', end='')
print()