Skip to content

Commit

Permalink
Merge pull request #1 from zlinna/zlinna-patch-1
Browse files Browse the repository at this point in the history
 update  func: isLeapYear
  • Loading branch information
nonocoke committed Jun 19, 2018
2 parents d591a1c + 42178d4 commit dfb3b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ch01_basic/at001_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# 闰年判断
def isLeapYear(year):
return (not year % 4 and year % 100) or (not year % 400)
return (not(year % 4 and year % 100)) or (not year % 400)


# 找零钱
Expand Down Expand Up @@ -97,4 +97,4 @@ def main():


if __name__ == '__main__':
main()
main()

0 comments on commit dfb3b87

Please sign in to comment.