Hi please could someone help. i have created this programming so you can work out if there is a LEAP YEAR. But i need it to handle centuries. heres the code
Please can someone help me out sort it out. THANX
Code:
def isLeapYear (year): result = year % 4 if result > 0: print "It is NOT a leap year" else: print "It IS a leap year" Result = (year * 100) % 4 if result >0: print "It is NOT a leap year" isLeapYear(400) isLeapYear(800) isLeapYear(1600) isLeapYear(1601) isLeapYear(2004) isLeapYear(2012) isLeapYear(3010) isLeapYear(3330)
Comment