Leap years
You must write a program which decides if a given year is a leap year or not. Sounds hard but there is a very simple algorithim you can use! Just implement the following rules in code. You must implement them in order and not run the other rules once one has been matched.
- It is a leap year if 400 divides cleanly with it.
- It is NOT a leap year if 100 divdes cleanly.
- It is a leap year if 4 divdes cleanly.
- Otherwise it is not a leap year.
Some values to test (they are leap years!)
- 1960
- 1964
- 1968
- 1972
- 1976
- 1980
- 1984
- 1988
- 1992
- 1996
- 2000
- 2004
- 2008
HELP – You will need to use IF…ELSE IF…..ELSE structure!
Also you need the modulus operator http://www.tutorialspoint.com/python/python_basic_operators.htm

You need to log in or create an account to submit code!











