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.
What is that condition? You can check my code to see how I accomplished it. Not exactly genius work though.
This solution demonstrates deep understand of Python. Very well done!
Note: in the current version of this kata, the function name is curry_partial.
It is the star operator
*
which is used in line 1 to pack into a list a variable number of arguments.On other lines it is used to unpack them
https://docs.python.org/3/reference/expressions.html#expression-lists
The same goes to pack keyword arguments into a dict with
**
operatorhttps://docs.python.org/3/reference/expressions.html#dictionary-displays
what is this '*' for in the variabels..?
Can someone explain the math happening in the if statement?
Why are we multiplying (g*3600) and dividing it by the difference of two speeds?
What does this represent?
This method is no longer feasible because it is too slow. A condition must be added to make the selection of j more rapid.
Nice, I've upvoted it because the thinking behind the algo is very good, but I note that this solution is very very slow on large number (try to check(123456789).
(NB : replace xrange with range for python 3)
You can cache the result if you want but that is not useful here.
I don't think so.
The kata asks to calculate enum(n) in 12 seconds, and this solution fails to do what is asked.
~
is bitwise complement - it inverses each bit of a number.Consequently,
~b == -b - 1
what does the ~ do in list indices? I really don't get that bit
super!!!
tks, I get it.
Can someone explain how it work? I cannot understand it. QAQ
Loading more items...