import random
list = []
for i in range(10):
list.append(random.randint(-10,10))
print(list)
print(sum(i for i in list if i > 0))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import random
list = []
for i in range(10):
list.append(random.randint(-10,10))
print(list)
print(sum(i for i in list if i > 0))