+ 1

How to find a leap year in Python??

#My Code def Calendar (year): if n/int(4): print ("True") elif n/int(100): print ("False") elif n/int(400): print ("True") n = int(input("Enter the year:")) Calendar (n) "QUESTION: To find a leap year.. The year can be evenly divisible by 4 is leap year.. The year can be evenly divisible by 100 is Not a leap year.. The year is also evenly divisible by 400 is a leap year.. Note: The output should in Boolean True or False.. If it is leap year it should print True else False "

10th Apr 2020, 7:15 AM
SelvaKumar
2 Antworten
10th Apr 2020, 7:22 AM
ANJALI SAHU
+ 1
Thanks bro.. It's helped.
10th Apr 2020, 7:35 AM
SelvaKumar