加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
to check leap year 459 Bytes
一键复制 编辑 原始数据 按行查看 历史
jainabpatel555 提交于 2020-10-05 23:27 . Create to check leap year
# Python program to check if year is a leap year or not
year = 2000
# To get year (integer input) from the user
# year = int(input("Enter a year: "))
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print("{0} is a leap year".format(year))
else:
print("{0} is not a leap year".format(year))
else:
print("{0} is a leap year".format(year))
else:
print("{0} is not a leap year".format(year))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化