Skip to content

Commit dfb3b87

Browse files
authored
Merge pull request #1 from zlinna/zlinna-patch-1
update func: isLeapYear
2 parents d591a1c + 42178d4 commit dfb3b87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch01_basic/at001_math.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# 闰年判断
1212
def isLeapYear(year):
13-
return (not year % 4 and year % 100) or (not year % 400)
13+
return (not(year % 4 and year % 100)) or (not year % 400)
1414

1515

1616
# 找零钱
@@ -97,4 +97,4 @@ def main():
9797

9898

9999
if __name__ == '__main__':
100-
main()
100+
main()

0 commit comments

Comments
 (0)