Created
September 17, 2014 20:38
-
-
Save LewkyB/32f50f3f051425a82197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Luke , Python , 9/17/2014 | |
month = raw_input("Month: ").lower() | |
year = int(raw_input("Year: ")) | |
month30 = ["september", "april", "june", "november"] | |
month31 = ["january", "march"] | |
month29 = ["february"] | |
if month in month30: | |
print "30 days" | |
elif month in month31: | |
print "31 days" | |
elif month in month29: | |
if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: | |
print "29 days" | |
else: | |
print "28 days" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment