Answer to Question #220753 in Python for Hari nadh babu

Question #220753

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

1
Expert's answer
2021-07-28T02:59:19-0400
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)
    

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS