а)import random
arr = []arr.extend(random.sample(range(1, 100), random.randint(1, 7)))arr.sort(reverse=True)while len(arr) < 15:arr.append(random.randint(1, 100))
print(arr)
б)arr.extend(random.sample(range(1, 100), random.randint(8, 15)))arr.sort()while len(arr) < 15:arr.append(random.randint(1, 100))
а)
import random
arr = []
arr.extend(random.sample(range(1, 100), random.randint(1, 7)))
arr.sort(reverse=True)
while len(arr) < 15:
arr.append(random.randint(1, 100))
print(arr)
б)
arr.extend(random.sample(range(1, 100), random.randint(8, 15)))
arr.sort()
while len(arr) < 15:
arr.append(random.randint(1, 100))
print(arr)