Home / Expert Answers / Computer Science / write-a-function-new-task-task-1d-start-steing-that-takes-task-id-a-list-of-strings-containing-pa314

(Solved): Write a function new_task(task_1d, start_steing) that takes: - task_id a list of strings containing ...




Write a function new_task(task_1d, start_steing) that takes:
- task_id a list of strings containing the tasks name and other
Scratchpad
Precheck only
Failed, as follows.
Global assignment statement at line 6
Global assignment statement at line 9
Glob
Write a function new_task(task_1d, start_steing) that takes: - task_id a list of strings containing the task's name and other information, - start_string a string, formatted 'hhiddimin'. It should retum a tuple of the form (task_id, timer), where timer is a list of integer times in seconds containing one element: start_string converted to the number of seconds elapsed since 12:00:00am (midnight). [A second time is added later, stopping the timer.] Hint: the function body of the author's solution is a single line. Scratchpad Precheck only Failed, as follows. Global assignment statement at line 6 Global assignment statement at line 9 Global assignment statement at line 12 You forgot to use the required function 'to seconds'. You forgot to define the required function "to_seconds'. Your code was not expected to generate any output when executed stand-alone. Did you accidentally include your test code? Sorry, but your code doesn't pass the style checks.


We have an Answer from Expert

View Expert Answer

Expert Answer



Here's an example implementation of the new_task() function:



This function first defines a helper function to_seconds() that takes a time string in the format 'hh:mm:ss' and returns the number of seconds since midnight.
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe