Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for When is Friday? by Orthomonalus
import calendar
def friday(day: str) -> int:
dia, month, year = day.split(".")
weekday_num = calendar.weekday(int(year), int(month), int(dia))
return (4 - weekday_num) % 7
print("Example:")
print(friday("23.04.2018"))
assert friday("12.04.2018") == 1
assert friday("01.01.1999") == 0
print("The mission is done! Click 'Check Solution' to earn rewards!")
March 23, 2026
Comments: