Is Leap Year
Is Leap Year
Tags: Basics
Credit: CodingChallenge
Difficulty: Beginner
Type: Text
Category: Practice
Time Allowed: 5 s
Description:
Write a function that takes a year as an integer and returns True
if it is a leap year, or False
otherwise. This problem is designed to help you practice working with dates and leap year calculations
. The function should accept one parameter and return a boolean value.
Constraints:
- The input will be an
integer
representing a year. - The function should
return
aboolean
value:True
orFalse
.
Example:
- Input:
2020
- Output:
True
Test Case | Input | Expected Output |
---|---|---|
1 | 2020 | True |
2 | 1900 | False |
3 | 2000 | True |
4 | 2023 | False |
Leave a Comment
Please login to leave a comment.