Вот код:
import random
# Сгенерируем список
lst = [random.randint(-30, 30) for _ in range(30)]
# 1
result = 1
for item in lst:
if item < 0:
result *= item
print(result)
# или
from functools import reduce
print(reduce(lambda x, y: x * y,
filter(lambda item: item < 0, lst)))
# 2
max_count = 0
count = 0
for item in lst:
if item < 0:
count += 1
if count > max_count:
max_count = count
print(max_count)
# 3
result = 0
for item in lst:
if item < 0:
result += item
print(result)
# или
negative_nums = list(filter(lambda item: item < 0, lst))
print(sum(negative_nums) if negative_nums else "NO")
a,b,c: integer;
begin
write('введите первую сторону треугольника ');
readln(a);
write('введите вторую сторону треугольника ');
readln(b);
write('введите третью сторону треугольника ');
readln(c);
if (a<0) or (a<0) or (b<0) then write('такого треугольника не существует ') else
if (a<>b) and (b<>c) then write('треугольник разносторонний') else
if (a=b) and (b=c) then write('треугольник равносторонний') else
if (a=b) or (a=c) or (b=c) then write('треугольник равнобедренный');
writeln;
end.