Question: please write in python3 Write a function getDay(date) that takes a space separated string as a date (MM DD YYYY) and it returns the week
Write a function getDay(date) that takes a space separated string as a date (MM DD YYYY) and it returns the week day that date was on te... Monday, Tuesday..). Obs, do not use Python string built-in functions like split() Hint: First of January was on Wednesday The datetime library can assist you with consulting the day of the week Weekday - Returns the day of the week as an integer, where Monday is O and Sunday is 6. For example, date(2002, 12, 4) weekday) == 2, Wednesday import datetime datetime_datetime (2020, 1, 1), weekday() returns 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
