Answer
$Code$
Work Step by Step
$Code:$
year = int(input("Enter yeaer:(e.g, 2012)"))
month = int(input("enter month: 1-12"))
dayOfMonth = int(input("Enter the day of month:1-31:"))
if month == 1 or month == 2:
$ $ $ $ month = 13 if (month == 1) else 14
$ $ $ $ year = year - 1
dayOfWeek = (dayOfMonth + (26 * month + 1)) / 10 + (year % 100) + (year % 100) / 4 +
(year / 100) / 4 + 5 * (year / 100) % 7
print("day of week is ")
if dayOfWeek == 0:
$ $ $ $ print("saturday")
elif dayOfWeek == 1:
$ $ $ $ print("Sunday")
elif dayOfWeek == 2:
$ $ $ $ print("Monday")
elif dayOfWeek == 3:
$ $ $ $ print("Tuesday")
elif dayOfWeek == 4:
$ $ $ $ print("Wednesday")
elif dayOfWeek == 5:
$ $ $ $ print("Thursday")
else:
$ $ $ $ print("Friday")
$Output:$