Leap year using python coderinme

leap year using python

Pyhton
One of the best quality of this language is that “Less code more output”.
This language is data type independent like we dont have to define that variable a is int or char , python can do it by itself
so what do you think
let’s code
leap year using python

def is_leap(year):
    leap = No
    
    # Write your logic here
    if year%4==0 and year%100!=0 or year%400==0:
        leap = Yes
    return leap
year = int(raw_input())
print is_leap(year)

if you want to learn Python so first click

Leave a reply:

Your email address will not be published.