def IsYearLeap(yr):
if yr % 4 == 0 and (yr % 100 !=0 or yr % 400 == 0):
return True
return False
yr = print(int(input("The year is:")))
print(IsYearLeap(yr))
File "/Users/timlee/Documents/Python/Test.py", line 2, in IsYearLeap
if yr % 4 == 0 and (yr % 100 !=0 or yr % 400 == 0):
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'
我不獨太明白為什麼會有這個Error,請求各位大大指教這個傻傻的問題 ~~謝謝