Georgian leap calendar is similar to the Gregorian calendar, with some differences in determining leap years. In the Georgian leap calendar:
Normal Years: A year is a normal year if it's not divisible by 4.
Leap Years: A year is a leap year if it's divisible by 4, except for years that are divisible by 100 but not divisible by 400.
Here's a detailed explanation of how you can implement the Georgian leap calendar logic using Python conditional statements:
Input is Shown Below :
Code :
# Here is the Georgian Calendar & Leap Year Program
Output is Shown Below :
Input: We ask the user to input a year using the
input()function. Theint()function is used to convert the input (which is initially a string) into an integer.Leap Year Check:
- We first check if the year is divisible by 4 (
year % 4 == 0). - If it is, we proceed to further checks.
- If it's not divisible by 4, we directly conclude that it's a normal year.
- We first check if the year is divisible by 4 (
Divisibility Checks:
- If the year is divisible by 100, we further check if it's divisible by 400. If it is, it's a leap year. If it's not, it's not a leap year.
- If the year is not divisible by 100, it's a leap year.
Output:
- We print the result indicating whether the year is a leap year or a normal year.



Comments
Post a Comment