I'm attempting to make a basic program to decide if a specific year is a leap year.
By definition, a leap year is actually divisible by four, yet not by 100, except if it is divisible by 400.
Here is my code:
def leapyr(n):
if n%4==0 and n%100!=0:
if n%400==0:
print(n, "is a leap year.")
elif n%4!=0:
print(n, "is not a leap year.")
print(leapyr(1900))
At the point when I attempt this inside the Python IDLE, the module returns None back. I'm almost certain that I ought to get
1900 is a leap year