Sort by

recency

|

3062 Discussions

|

  • + 0 comments
    def is_leap(year):
        leap = False
        
        if not year % 4:
            if (not leap % 100 and not year % 400) or year % 100 :
                leap = True  
        return leap
    
  • + 1 comment
    leap = False
    
    # Write your logic here
    if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
        leap = True
    else:
        leap = False
    
    return leap
    
  • + 0 comments

    this is working guys if u r having problem solving

    def is_leap(year):

    # Write your logic here
    if (year%4==0 and year%100!=0) or year%400==0:
        leap=True
    elif year%100==0 and year%4!=0 or year%400!=0:
        leap=False
    return leap
    

    year = int(input())

  • + 0 comments

    def is_leap(year): leap = False

    if year%400==0:
        leap = True
    elif year%100==0:
        leap = False
    elif year%4==0:
        leap = True
    
    return leap
    

    year = int(input()) print(is_leap(year))

  • + 3 comments

    Can anyone help me with this questions solution, I tries most of the time, even if its correct throwing error!!