后来想通过以前学习的,让他循环五次,每次就是一个结果出了五遍停止
print('判断年份是否为闰年')
temp = input('输入你想要的年份')
while not temp.isdigit():
temp = input("请输入整数")
x=1
while x<5:
year = int(temp)
if year/400 == int(year/400):
print(temp+'是闰年')
else:
if(year/4 == int(year/4) and year/100 != int(year/100)):
print(temp+'是闰年')
else:
print(temp+'不是闰年')
x+=1