0

need some help on the coding can some plz help

the question is:

A year is a leap year if it is divisible by 4, unless the year is a Century, in which case it is

only a leap year if it is divisible by 400. Write a function which takes a year as an argument

and prints a message to the screen saying whether or not that year is a leap year.

this the ouline that i have got:

1 def isLeapYear ( year ):

2 ...

3

4 # Testing ...

5 isLeapYear (400)

6 isLeapYear (800)

7 isLeapYear (1600)

8 isLeapYear (1601)

9 isLeapYear (2004)

10 ...

ive come up with some coding of my own but it doesnt work:

((Year % 4 == 0) and (not (Year % 100 == 0))) or (Year % 400 == 0)

(Year % 4 == 0) and not (Year % 100 == 0) or (Year % 400 == 0)