temp = 1
key = 1
temp = input("please enter the uncertain year : \n")
while key != 0:
while not temp.isdigit():
print("Input Error!")
temp = input("please enter again")
year = int(temp)
k = int(year%4)
t = int(year%400)
if k == 0:
if year%100!=0:
print("yea dat is a leap year!")
else:
if t == 0:
print("yea dat is a leap year!")
else:
print("but sorry ,dat is not a leap year!")
else :
print("but sorry ,dat is not a leap year!")
#这里应该再加一个else,否则不是4的倍数就不会输出判断的结果而是直接让你再输入
key = int(input("if you wanna countinue please enter the year,if not enter 0 \n"))
#把key给int掉,然后再去判断,否则的话会一直循环,即使你输的是0
temp = str(key)
#把key给int掉temp就是int型,不包含isdigit()方法,所以给str回来