import random

list = []
listSize = 5
while listSize > 0:
    list.append(random.randint(-100, 100))
    listSize -= 1

print("Исходный массив:", list)

sum = 0
pos = 0
for i in range(list.__len__()):
    sum += list[i]
    if list[i]>0:
        pos+=1

list[0] = sum
list[1] = pos
print("Новый массив:   ", list)

e39ef17605712fa02509b892df8d656d7c4ac926
<mask token>

<mask token>
while listSize > 0:
    list.append(random.randint(-100, 100))
    listSize -= 1
print('Исходный массив:', list)
<mask token>
for i in range(list.__len__()):
    sum += list[i]
    if list[i] > 0:
        pos += 1
<mask token>
print('Новый массив:   ', list)

<mask token>
list = []
listSize = 5
while listSize > 0:
    list.append(random.randint(-100, 100))
    listSize -= 1
print('Исходный массив:', list)
sum = 0
pos = 0
for i in range(list.__len__()):
    sum += list[i]
    if list[i] > 0:
        pos += 1
list[0] = sum
list[1] = pos
print('Новый массив:   ', list)

import random
list = []
listSize = 5
while listSize > 0:
    list.append(random.randint(-100, 100))
    listSize -= 1
print('Исходный массив:', list)
sum = 0
pos = 0
for i in range(list.__len__()):
    sum += list[i]
    if list[i] > 0:
        pos += 1
list[0] = sum
list[1] = pos
print('Новый массив:   ', list)

import random

list = []
listSize = 5
while listSize > 0:
    list.append(random.randint(-100, 100))
    listSize -= 1

print("Исходный массив:", list)

sum = 0
pos = 0
for i in range(list.__len__()):
    sum += list[i]
    if list[i]>0:
        pos+=1

list[0] = sum
list[1] = pos
print("Новый массив:   ", list)
