3 Leap Year Check Write a Python program that asks the user to enter a year. Then check if the given year is a leap year or not. A year is a leap year if it is divisible by 4 but not divisible by 100, OR if it is divisible by 400. If the year is a leap year, print "Leap year". If not, print "Not a leap year". The program must take the year as input from the user. Easy
Examples
Example 1
Input
2000
Output
Leap year
Explanation 2000 is divisible by 400 so it is a Leap year
Example 2
Input
1900
Output
Not a leap year
Explanation 1900 is divisible by 100 but not by 400 so it is Not a leap year
Example 3
Input
2024
Output
Leap year
Explanation 2024 is divisible by 4 and not divisible by 100 so it is a Leap year
Acceptance100%
Accepted1
Submissions1
Auto-save
SavedLn 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
Leap year
No results yet
Run your code to test it against the sample cases.