Leap Year
Easy 20 XPConditions
Commonly asked at TCS, Wipro
Read a year and print Leap if it is a leap year, otherwise Not Leap. A year is a leap year if it is divisible by 4 but not by 100, or if it is divisible by 400.
- Input
- One integer: the year.
- Output
- Leap or Not Leap.
Sample 1
Input
2024
Output
Leap
Sample 2
Input
1900
Output
Not Leap
Read input with input() (no prompt message) and print only the answer. Run tries the Input box; Submit checks all test cases.
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.The solution unlocks after 3 submissions.