avatar Bite 173. Set up future notifications

Let's do another datetime processing Bite. Complete add_todo below that converts time units to future timestamps.

Here is how it works with given default start_time of NOW:

>>> from timer import add_todo, NOW
>>> str(NOW)
'2019-02-06 22:00:00'
>>> add_todo("11h 10m", "Wash my car")
'Wash my car @ 2019-02-07 09:10:00'
>>> add_todo("30d", "Code a Bite")
'Code a Bite @ 2019-03-08 22:00:00'
>>> add_todo("5m 3s", "Go to Bed")
'Go to Bed @ 2019-02-06 22:05:03'

See the docstring and tests for more output examples. Good luck and code more Python!

Login and get coding
go back Intermediate level
Bitecoin 3X

Will you be the 130th person to crack this Bite?
Resolution time: ~61 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 4.83 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help