temp = input("请输入一个年份:")
while not temp.isdigit():
print("您的输入不合法")
temp = input("请输入一个年份:")
year = int(temp)
if (year %4==0 and year %100 !=0) or year%400 ==0:
print("您输入的年份是闰年")
else:
print("您输入的年份不是闰年")
标签:class 一个 pre and python log gpo dig highlight
temp = input("请输入一个年份:")
while not temp.isdigit():
print("您的输入不合法")
temp = input("请输入一个年份:")
year = int(temp)
if (year %4==0 and year %100 !=0) or year%400 ==0:
print("您输入的年份是闰年")
else:
print("您输入的年份不是闰年")
标签:class 一个 pre and python log gpo dig highlight
原文地址:https://www.cnblogs.com/sunshining-f/p/8624532.html