Leap Year

    0

    0

    Aakanksha Priya

    Check whether a given year is leap year or not

    def checkleap(year):
        if (year % 4) == 0:
            if (year % 100) == 0:
                if (year % 400) == 0:
                    print("Leap Year")
                else:
                    print("Not a leap year")
            else:
                print("Leap Year")
        else:
            print("Not a leap year")
    y = int(input("Enter year: "))
    checkleap(y)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.