Sort by

recency

|

669 Discussions

|

  • + 0 comments
    import calendar
    
    month, day, year = input().split()
    day_of_year = calendar.weekday(int(year), int(month), int(day))
    
    if day_of_year == 0:
        print("MONDAY")
    elif day_of_year == 1:
        print("TUESDAY")
    elif day_of_year == 2:
        print("WEDNESDAY")
    elif day_of_year == 3:
        print("THRUSDAY")
    elif day_of_year == 4:
        print("FRIDAY")
    elif day_of_year == 5:
        print("SATURDAY")
    else:
        print("SUNDAY")
    
  • + 0 comments

    I once forgot an important shoot date, but luckily, Richmond Archer Photography had it marked on their calendar saved me big time!

  • + 1 comment

    Could someone explain why the firstweekday is 6 in the sample code?

    print calendar.TextCalendar(firstweekday=6).formatyear(2015)
    
  • + 0 comments

    import calendar m,d,y=input().split(" ") print(calendar.day_name[calendar.weekday(int(y),int(m),int(d))].upper())

  • + 0 comments
    import calendar 
    m, d, y = map(int, input().split())
    print(calendar.day_name[calendar.weekday(y, m, d)].upper())