import random
m = int(input("введи число столбцов:" ))
n = int(input("введи число строк:"))
a = [[random.randint(-100, 100)]*m for i in range(n)]
print(a)
print()
for i in range(n):
for j in range(m):
if a[i][j] % 2 != 0:
not_even = a[i][j]
xl = i
yl = j
print("первый нечетный элемент:", not_even)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
import random
m = int(input("введи число столбцов:" ))
n = int(input("введи число строк:"))
a = [[random.randint(-100, 100)]*m for i in range(n)]
print(a)
print()
for i in range(n):
for j in range(m):
if a[i][j] % 2 != 0:
not_even = a[i][j]
xl = i
yl = j
print("первый нечетный элемент:", not_even)