from random import randint
li = [randint(1, 100) for i in range(int(input("Input N: ")))]
print(li)
num = 1
n = 0
while n<len(li):
if li[n] > num:
num = li[n]
n += 1
print(num)
Объяснение:
from random import randint
li = [randint(1, 100) for i in range(int(input("Input N: ")))]
print(li)
num = 1
n = 0
while n<len(li):
if li[n] > num:
num = li[n]
n += 1
print(num)
Объяснение: