Python:
from random import randint
N = [randint(-15, 30) for i in range(9)]
N = [i for i in N if -5 >= i <= 15]
print(sum(N))
n = [randint(-15, 30) for i in range(9)]
n = [i for i in n if -5 >= i <= 15]
print(*n,"=",sum(n))
Python:
from random import randint
N = [randint(-15, 30) for i in range(9)]
N = [i for i in N if -5 >= i <= 15]
print(sum(N))
from random import randint
n = [randint(-15, 30) for i in range(9)]
n = [i for i in n if -5 >= i <= 15]
print(*n,"=",sum(n))