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 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