#写一个程序,判断给到的年份是否为闰年
temp=input(\'请输入一个年份:\')
while temp.isdigit()==False:
temp=input(\'该吃药了吧,重新输入:\')
year=int(temp)
if ((year%4==0) and (year%100!=0)) or (year%400==0):
print(temp+\'年是闰年\')
else:
print(temp+\'年不是闰年\')
相关文章: