Код:
from random import randint
ac = []
for i in range(20):
ac.append(randint(1,100))
sum_left = 0
sum_right = 0
for i in range(10):
sum_left += ac[i]
for i in range(10, 20):
sum_right += ac[i]
print(sum_left, sum_right)
Код:
from random import randint
ac = []
for i in range(20):
ac.append(randint(1,100))
sum_left = 0
sum_right = 0
for i in range(10):
sum_left += ac[i]
for i in range(10, 20):
sum_right += ac[i]
print(sum_left, sum_right)