📜  python闰年解决方案 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:40.649000             🧑  作者: Mango

代码示例2
year = int(input("Write any year to check if it is leap year:- "))
if year % 4 == 0:
  if year % 100 == 0:
    if year % 400 == 0:
      print("Leap year.")
    else:
      print("Not leap year.")
  else:
    print("Leap year.")
else:
  print("Not leap year.")