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.
ok. Understood. I will look into fixing that. However, Im currently way north of the arctic circle with very spotty internet, so will take a couple of days
Python translation. Please, review and approve.
I understood that you want to handle them differently, it just makes little sense logically. But it's your kata, your design choices.
You cut the text, it says:
"This can be solved by translating any instruction to turn the dial left, to a corresponding right turn. A left turn of 11, for example, would leave the dial at label 8, which means that the smallest equivalent number of turns to the right is 7."
And there is an example with a turn to the right of size 10, so should be more clear now.
I want them to be handled differently.
But why..? The description states:
Seems like 1 is < 10, so the 2 handlings are inconsistent.
If you skip reading the first part of description (backstory), like I often do, it's not mentioned anywhere how many dials there are, so the task becomes confusing.
Markin this as solves. As this is specified in the description and I have motivated the reasoning elsewhere in these threads.
Could you elaborate, not sure that I follow.
As I wrote in another thread:
The reason I decided to filter out anything that was divisible by 9 is that I do not think a Dial Combination Safe ever would have a sequence where the same label showed up in sequence.
I do not think one of those old lock ever could have a password combination that was, for example, 1-2-3-3-5 since going from 3 to 3 means not turning the dial at all.
So, to fit into the narrative a bit, I decided that the passwords here also would not have any such sequences.
Hi, the reason I decided to filter out anything that was divisible by 9 is that I do not think a Dial Combination Safe ever would have a sequence where the same label showed up in sequence.
I do not think one of those old lock ever could have a password combination that was, for example, 1-2-3-3-5 since going from 3 to 3 means not turning the dial at all.
So, to fit into the narrative a bit, I decided that the passwords here also would not have any such sequences.
That is actually by design. I made it like that such that it would be different handling for L and R.
The only reason I made the answer take a product of R-turns and the label it landed on, was to force the user to translate the L turns into R turns at all.
And since any L turn could be translated to different number of R turns, depending on how many full rotations, I decided to put in that info for the Left turns.
Hmm you're right... Still, the inconsistent handling needs to be addressed.
It is specified for L "which means that the smallest equivalent number of turns to the right" -> smallest equivalent number
and for R the cases show that we should not use any modulo.
Though the description could be more clear, and it doesn't make much sense that there is different modulo behavior for R vs L.
It would be more helpful to have information about number of dials when describing task itself, not just part of the story.
If 10 * 'R' is the same as one move to right, why must we use 10 when calculating result? It seems different from calculating steps left, for 'L' * 10+, and that behavior isn't specified either.
Loading more items...