Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

def is_leap(year): leap = False

def is_leap(year):
    leap = False
    if(year%4==0):
        #century year check
        if(year%100==0):
            #century leap year check
            if(year%400==0):
                leap=True
        else:
            leap=True
    return leap
Comment

PREVIOUS NEXT
Code Example
Python :: python button click code 
Python :: python len 
Python :: python group by 
Python :: add new column to pandas dataframe 
Python :: math floor python 
Python :: np.vstack python 
Python :: list comprehension odd numbers python 
Python :: python buffer 
Python :: python inherit from objects 
Python :: filter dictionary python 
Python :: positive and negative number in python 
Python :: python virtual env 
Python :: socket.accept python 
Python :: def rectangles 
Python :: pygame draw square 
Python :: fastest way to check odd or even in python 
Python :: python default dictionary 
Python :: django filter on related field 
Python :: min max code in python 
Python :: a int and float python 
Python :: add to list python 
Python :: open chrome console in selenium 
Python :: csv reader url 
Python :: part of a flower 
Python :: Merge multiple dataframs 
Python :: python suppress print output from function 
Python :: How to sum a column in Python csv 
Python :: python numpy euler 
Python :: python3 vowels and consonants filter 
Python :: slug 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =