1)
number_list = [0, 15, 12, -9, -8, 58, 45, 36, -85, 58, 36, -45, 2, 3, 25, -9]
amount = 0
for n in number_list:
if n > 0:
amount += n
print('сумма положительных чисел: ' + str(amount))
negative_numbers = []
for i in number_list:
if i < 0:
negative_numbers.append(i)
print('количество отрицательных элементов: ' + str(len(negative_numbers)))
2)
number_list = []
for n in range(8):
number_list.append(int(input()))
print('массив:', number_list)
multiplication = 1
if i != 0:
multiplication = multiplication * i
print('произведение элементов, не равных нулю: ' + str(multiplication))
1)
number_list = [0, 15, 12, -9, -8, 58, 45, 36, -85, 58, 36, -45, 2, 3, 25, -9]
amount = 0
for n in number_list:
if n > 0:
amount += n
print('сумма положительных чисел: ' + str(amount))
negative_numbers = []
for i in number_list:
if i < 0:
negative_numbers.append(i)
print('количество отрицательных элементов: ' + str(len(negative_numbers)))
2)
number_list = []
for n in range(8):
number_list.append(int(input()))
print('массив:', number_list)
multiplication = 1
for i in number_list:
if i != 0:
multiplication = multiplication * i
print('произведение элементов, не равных нулю: ' + str(multiplication))