Ответ:
arr1 = {1, 2, 3, 4, 5}
arr2 = {5, 4, 3, 2, 1}
arr3 = {}
for i in range(5):
arr3[i] = arr1[i] * arr2[i]
if arr3[i] % 3 == 0:
arr3[i] = 0
# Или можно
if arr1[i] * arr2[i] % 3 != 0:
else:
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
arr1 = {1, 2, 3, 4, 5}
arr2 = {5, 4, 3, 2, 1}
arr3 = {}
for i in range(5):
arr3[i] = arr1[i] * arr2[i]
if arr3[i] % 3 == 0:
arr3[i] = 0
# Или можно
arr1 = {1, 2, 3, 4, 5}
arr2 = {5, 4, 3, 2, 1}
arr3 = {}
for i in range(5):
if arr1[i] * arr2[i] % 3 != 0:
arr3[i] = arr1[i] * arr2[i]
else:
arr3[i] = 0
Объяснение: