A leap year happens every four years, so it's a year that is perfectly divisible by four.
However, if the year is a multiple of 100 (1800, 1900, etc), the year must be divisible by 400 to be leap.
Write a function that determines if the year is a leap year or not.
Examples:
year = 2020 ➞ True year = 2021 ➞ False year = 1968 ➞ True year = 1900 ➞ False
Video Solution:
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
