Write a python function dayOfWeek(m,d,y) that computes the day of week by using the
following formula, Where d is day, m is month, y is year
dayofweek = ( [23m/9] + d + 4 + y + [z/4] - [z/100] + [z/400] - 2 (if m >= 3) ) mod 7
This formula is described in the website http://www.cadaeic.net/calendar.htm
[x] means to truncate downward to the nearest integer
z = y - 1 if m < 3,
z = y otherwise.
Note if m >=3, you subtract 2 before you % 7 as shown in the above formula.
You can also find more algorithms for computing day of week from
https://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
If dayofweek is 0 then it is a Sunday. If dayofweek is 1 then it is Monday, 2 is Tuesday, 3
is Wednesday etc.
For example, if d =24, m=11, y=2022 then dayofweek is 4 so it is Thursday.
assertion code that you can try to check the code is working properly:
assert (dayOfWeek(12,25,2022) == 0)
assert (dayOfWeek(11,1,2022) == 2)
assert (dayOfWeek(11,24,2022) == 4)
assert (dayOfWeek(1,1,2023) == 0)
print ("Passed dayOfWeek tests!")