For example if I input the year – 2012 and the day 72, it should return Tuesday.The following code will return proper day of the week, but requires month as an input. How could I do this without the month argument, since I am not requiring a user to type in a month?
days = {0:'Monday', 1:'Tuesday', 2:'Wednesday', 3:'Thursday', 4:'Friday', 5:'Saturday', 6:'Sunday'}
userdate = date(year, month, day)
weekday = userdate.weekday()
return days[weekday]
OR:
E.g: