I'm trying to make this function work... This function has one integer parameter, a year. Return True if this year is a leap year according to the Gregorian calendar, and False otherwise. A year is a leap year according to the Gregorian calendar if it is divisible by 4, except if it is a centennial year (ends with 00), in which case it is a leap year only if it is divisible by 400. For one, when I run it it won't display True or False (Gives value 0). What am I doing wrong?
change the last line to: return ((gregorian and centennial) or (remainder and not centennial)) and True or False if you really want to do it all in one line.