/
fgtrwt
/
Python_Django_Learn
Обзор
Документация
Войти
/
fgtrwt
/
Python_Django_Learn
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
zadaniya
python_intro/second_task.py
80 строк
2 KB
fgtrwt
upload files
19 авг 2025, 09:02
19 авг 2025, 09:02
f67a733
Код
Авторство
О чём код?
a = int(input()) b = int(input()) print( a > 5, b > 5, not a, a == b, a + 5 == b, b <= a, ) god = int(input()) if god % 4 == 0 and god % 100 != 0 or god % 400 == 0: print("Високосный") else: print("Обычный") y = 'ab2h625' print(y[::-1]) s = input() v = int(input()) print(s[:v], s[-v:], s[::v]) inp = input() months = { "январь": "01", "февраль": "02", "март": "03", "апрель": "04", "май": "05", "июнь": "06", "июль": "07", "август": "08", "сентябрь": "09", "октябрь": "10", "ноябрь": "11", "декабрь": "12" } for month in months: if month in inp: print(months[month]) chisl = eval(input()) cif = int(input()) listnum2 = [] for item in chisl: if isinstance(item, int) and item > 0: listnum2.append(item) print(listnum2[cif::cif-1]) in1 = eval(input()) num7 = int(input()) in2 = [] for number in in1: count = 0 if isinstance(number, int) and number > 0: for i in range(1, number): if number % i == 0 or number % 1 == 0: count += 1 in2.append(number) break print(in2[::-1][num7::num7-1]) summa = 0 while True: num = input() try: if "." in num: summa += float(num) else: summa -= int(num) except ValueError as e: if num == "выход": break else: print("ошибка") print(summa)