friday 13

This commit is contained in:
Johan Alexander López Loaiza 2023-10-27 23:41:10 -05:00
parent e232c697d6
commit f8602798de
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,11 @@
from calendar import monthcalendar
month = int(input("Ingrese el mes (ingrese el número del mes): "))
year = int(input("Ingrese el año: "))
date = monthcalendar(year, month)
if date[1][4] == 13 or date[2][4] == 13:
print(True)
else:
print(False)

View File

@ -0,0 +1,12 @@
from calendar import monthcalendar
def friday13(year, month):
date = monthcalendar(year, month)
if date[1][4] == 13 or date[2][4] == 13:
print(True)
else:
print(False)
return