-
-
Save nicolasmendoza/e44729034f0dc735c53ade8a0cf0f700 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
def days_of(month): | |
months = {"Enero": 31, "Febrero": 28, "Marzo": 31, "Abril": 30, "Mayo": 31, "Junio": 30, "Julio": 31, | |
"Agosto": 31, "Septiembre": 30, "Octubre": 31, "Noviembre": 30, "Diciembre": 31} | |
if months.get(month, None): | |
message = "El mes de {name} posee {days} días.".format(name=month, days=months[month]) | |
if month == 'Febrero': | |
message += " Salvo los años bisiestos." | |
return message | |
return 'Mes incorrecto.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment