Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Rounding in this context mean both UP and DOWN.
8 minutes = 15 minutes
7 minutes = 0 minutes
This is contrast to real life shift where it's always round up to avoid lawsuit. No woonder I kept failing the test.
Thanks for the kata.
Fixed in latest fork above
Approved!
Python test should use decorator syntax, fixed in this fork
Also implemented this suggestion, changing the input to list of 2-ples
Seems fixed
(Python)
shifts
should be a list of tuples.The quote is Float like a butterfly, sting like a bee ;)
One-liners are much less readable when they are this long. Just write the same code in 2 or 3 lines and one can actually read it quickly and easily.
If you choose to unlock the solution, you won't be able to gain any honor for solving it. It's best to use that as a last resort. At the very least, Google is helpful!
The variable has been renamed to
shifts
The kata has been updated and now tests for this. Thank you for your input!
Damn. You're right. Good catch
the argument in the solution setup could/should be named
clocks
or maybe bettershifts
(but plural in any case)Needs edge case
test.assert_equals(get_hours([["12:01am", "3:00am"], ["3:00pm", "12:00pm"]]), [3.0, 21.0])
. At least 3 existing solutions fail at this test.Loading more items...