In this HackerRank Calendar Module problem solution, we have given data and our task is to find what the day is on that date.


HackerRank Calendar Module in python problem solution

HackerRank Calendar Module problem solution in python.


import calendar
month, day, year = map(int, raw_input().split())
day = calendar.weekday(year,month,day)
if day == 0:
    print "MONDAY"
elif day == 1:
    print "TUESDAY"    
elif day == 2:
    print "WEDNESDAY"
elif day == 3:
    print "THURSDAY"
elif day == 4:
    print "FRIDAY"
elif day == 5:
    print "SATURDAY"
elif day == 6:
    print "SUNDAY"