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.
someone tried to make one line solution but failed
Oh God You're Right
When an Assembly programmer tries C++
You used recursion while I can't even comprehend them in their best use-cases. Bruh how do you even thinks like this
Thanks! I get it now
Smallest solution w/o any modules! Great job :D
It is called (un)packing. You can assign a list to several variables in one line and vice versa.
Star operator on right side is used to unpack a list ; on left side it is used to pack it.
More into Python docs and PEP-448 (Unpacking generalizations).
Least keystrokes solution. AMAZING! Please please explain how this works. How are the 3 variables assigned different values? Why *p, not p?
thanks!
There is no decimal part, so no
.0
. You choose the greater prefix you actually exceed:100,000 ohms
don't exceed 1Mohms => 100k ohms100,000,000 ohms
exceed 1kohms and 1Mohms, choose the greater => 100M ohmsCould anyone help me with the prefix part? How does it choose k vs M? Also, in cases of 5.0, how is the '.0' eliminated?
Least keystrokes solution. Well done.
Thanks, this is honestly new to me
This comment is hidden because it contains spoiler information about the solution
Very clever :D