Question: Python program Could you help me out? def command_add(date, eventdetails, calendar): (str, str, dict) rightarrow str Add event_details to the list at calendar(date) Create date

Python program
Could you help me out?  Python program Could you help me out? def command_add(date, eventdetails, calendar):

def command_add(date, eventdetails, calendar): (str, str, dict) rightarrow str Add event_details to the list at calendar(date) Create date if it was not there date: A string date formatted as "YYYY-MM-DD" event_details: A string describing the event calendar: The calendar database return: empty string calendar = {} command add("2017-02-28", "Python class", calendar) calendar == {'2017-02-28': ['Python class']} True command_add("2017-03-11", "CSCA08 test 2", calendar) calendar == {'2017-03-11': ['CSCA08 test 2'], '2017-02-28':\ ['Python class']} True command_add("2017-03-11", "go out with friends after test", calendar) calendar == {'2017-03-11': ['CSCA08 test 2', \ 'go out with friends after test'], '2017-02-28': ['Python class']} True # YOUR CODE GOES HERE pass def command_show(calendar): r (dict) rightarrow str Returns the list of events for calendar sorted in increasing date order as a string, see examples below for a sample formatting calendar: the database of events def command_add(date, eventdetails, calendar): (str, str, dict) rightarrow str Add event_details to the list at calendar(date) Create date if it was not there date: A string date formatted as "YYYY-MM-DD" event_details: A string describing the event calendar: The calendar database return: empty string calendar = {} command add("2017-02-28", "Python class", calendar) calendar == {'2017-02-28': ['Python class']} True command_add("2017-03-11", "CSCA08 test 2", calendar) calendar == {'2017-03-11': ['CSCA08 test 2'], '2017-02-28':\ ['Python class']} True command_add("2017-03-11", "go out with friends after test", calendar) calendar == {'2017-03-11': ['CSCA08 test 2', \ 'go out with friends after test'], '2017-02-28': ['Python class']} True # YOUR CODE GOES HERE pass def command_show(calendar): r (dict) rightarrow str Returns the list of events for calendar sorted in increasing date order as a string, see examples below for a sample formatting calendar: the database of events

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!