This is the classic leap year finder program with python. This problem is labelled as "hard" on many practice sites, but actually the programming is not hard at all. What's hard is the description of the leap year and how to translate it into the programming language.
The leap year conditions:
- If a year is divisible by 4 then it is a leap year, "unless" it is also divisible by 100. This condition suggests the use of 'AND' in a logical comparison clause.
- If the year doesn't fit the first condition, for example, if the year is divisible by 4 and 100, it must also be divisible by 400 to be a leap year, otherwise it is not.
Credit: This program is a modification of a Python program found in Angela Yu's "100 Days of Code: The Complete Python Pro Bootcamp" on Udemy. You can go to the course's page by clicking the following link (not a ref. link): https://www.udemy.com/course/100-days-of-code/