from random import randint
n = int(input("Введіть кількість чисел: "))
s = [randint(-100, 100) for i in range(n)]
print(s)
s.sort()
s[0] = 0
s[-1] = 0
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
from random import randint
n = int(input("Введіть кількість чисел: "))
s = [randint(-100, 100) for i in range(n)]
print(s)
s.sort()
print(s)
s[0] = 0
s[-1] = 0
print(s)