from random import randint
a = [[randint(1,10) for i in range(10)] for i in range(5)] # создаём матрицу 5x10
[print(*i) for i in a] # выводим
pr = 1
for i in range(len(a)): # считаем произведение элементов
for ii in a[i]:
pr *= ii
print(pr)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
from random import randint
a = [[randint(1,10) for i in range(10)] for i in range(5)] # создаём матрицу 5x10
[print(*i) for i in a] # выводим
pr = 1
for i in range(len(a)): # считаем произведение элементов
for ii in a[i]:
pr *= ii
print(pr)