from random import randint
#5
print("Завдання 5")
number = randint(10, 999999)
print(number)
print([int(i) for i in str(number)])
print()
#6
print("Завдання 6")
arr4 = [randint(0, 20) for i in range(randint(1, 15))]
print(arr4)
print(range(len(arr4)))
for i in range(len(arr4)):
if i<arr4[i]:
print(arr4[i], end=" ")
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
from random import randint
#5
print("Завдання 5")
number = randint(10, 999999)
print(number)
print([int(i) for i in str(number)])
print()
#6
print("Завдання 6")
arr4 = [randint(0, 20) for i in range(randint(1, 15))]
print(arr4)
print(range(len(arr4)))
for i in range(len(arr4)):
if i<arr4[i]:
print(arr4[i], end=" ")
print()