how to make a lip year finder in python???
Answers
Answered by
1
Answer:
See this example:
- year = int(input("Enter a year: "))
- if (year % 4) == 0:
- if (year % 100) == 0:
- if (year % 400) == 0:
- print("{0} is a leap year". format(year))
pls mark me brain list and also follow
have an nice day dear!!! :-)
Answered by
1
year = 2000
# To get year (integer input) from the user
# year = int(input("Enter a year: "))
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print("{0} is a leap year".format(year))
else:
print("{0} is not a leap year".format(year))
else:
print("{0} is a leap year".format(year))
else:
print("{0} is not a leap year".format(year))
Output
2000 is a leap year
Similar questions