Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
21 lines (14 loc) · 657 Bytes

instructions.md

File metadata and controls

21 lines (14 loc) · 657 Bytes

A leap year in the Gregorian calendar occurs

  • on every year that is evenly divisible by 4,
  • except every year that is evenly divisible by 100,
  • unless the year is also evenly divisible by 400.

For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is.

1. Write boolean expressions to determine divisibility for the rules given above

2. Combine these expressions to a single boolean expression that describes whether a given year y is a leap year

3. Wrap it in the isleapyear function

julia> isleapyear(2000)
true