project_python/2.2_lesson.6.20.py
2025-12-15 13:23:27 +05:00

25 lines
830 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

****Задание 6 Параграф 2.2***
****Вася любит полениться. Особенно ему нравится, когда в году появляется такой лишний денёк, которого обычно не бывает.
Напишите программу, которая поможет Васе определить, удастся ли ему побездельничать в определённом году или нет.****
if name == "main":
year = int(input())
yes = False
if year % 4 == 0:
if year % 100 == 0:
if year % 400 != 0:
yes = False
else:
yes = True
else:
yes = True
else:
yes = False
if yes is True:
print('YES')
else:
print('NO')