We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Date and Time
- Calendar Module
- Discussions
Calendar Module
Calendar Module
Sort by
recency
|
677 Discussions
|
Please Login in order to post a comment
Precise snippet code -> It clears all test cases
import datetime x=map(int,input().split()) a,b,c=x y=datetime.datetime(c,a,b) print((y.strftime('%A')).upper())
# Enter your code here. Read input from STDIN. Print output to STDOUT
import calendar
month , day , year = map(int,input().split())
weekday_index = calendar.weekday(year , month , day)
weekday_name = calendar.day_name[weekday_index]
print(weekday_name.upper())
import calendar date_input = list(map(int,input().split(' '))) weekday_number = calendar.weekday(date_input[2], date_input[0], date_input[1]) weekday_dict = {0:"Monday", 1:"Tuesday", 2:"Wednesday",3:"Thursday",4:"Friday", 5:"Saturday",6:"Sunday"} print(weekday_dict[weekday_number].upper())