Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkx8326/leapyear_python
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.
https://github.com/pkx8326/leapyear_python
algorithm calculator leap leapyear python simple year
Last synced: 1 day ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/pkx8326/leapyear_python
- Owner: pkx8326
- Created: 2022-01-19T02:36:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T12:03:09.000Z (almost 3 years ago)
- Last Synced: 2024-01-08T11:17:46.426Z (10 months ago)
- Topics: algorithm, calculator, leap, leapyear, python, simple, year
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leap year with Python
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:
1. 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.
2. 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/