Leap Year
This Program name is Leap Year. Write a Python program to Leap Year, it has two test cases
The below link contains Leap Year question, explanation and test cases
https://drive.google.com/file/d/1OxFAPhxSfay0CussSEZ_OmW78GAHhOvk/view?usp=sharing
We need exact output when the code was run
def LeapYear(n):
if (n % 4) == 0:
if (n % 100) == 0:
if (n % 400) == 0:
print("True")
else:
print("False\n")
else:
print("True")
else:
print("False\n")
print("Test Case – 1")
year = int(input("Input\n"))
print("Output")
LeapYear(year)
print("\nTest Case – 2")
year1 = int(input("Input\n"))
print("Output")
LeapYear(year1)
Comments
Leave a comment