6 kyu
Rotation Cipher Cracker
605 of 919NicholasSeward
Loading description...
Ciphers
Cryptography
Algorithms
Security
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This comment has been hidden.
python new test framework is required. updated in this fork
Approved
Description should be language-agnostic
Returned results are to be sorted as well. See last line below for an example:
, but tests in all languages have sort the output, so this line should be removed or rewordedFixed in this fork
#11b2T/3pz:0z:vV
excellent kata
wow. it was a great challenge !
Ruby 3.0 should be enabled.
Enabled in this fork
The function is called twice to also generate an error message in Python (at least).
No fixed tests in Python (at least).
Added. Other languages already have them
Python: assert_equals should be used.
Have you seen how the tests work?
Here's the problem: The instructions talk about 25 different ways to decode the string. But I could only pass the random tests by trying 26 different shift values. Specifically: The completely unshifted string (i.e., identical to the input string) has to be considered as one of the possibilities. The instructions should be edited to reflect this.
This should be fixed and added to the description. 25 shift values + the unshifted string.
I just updated the description with a note explaining this at the end, so it should make more sense now.
Thanks!
Python: there are some weird variables 'a' and 'b', which used to mess with my code (I had a variable a = ord('a'))
This comment has been hidden.
Fixed. Made a note about that.
Thanks for putting this into JS; you should indicate the return output array is to be sorted.
Translated into Ruby and JS, if you want to add those versions too :)
both seem approved.
contain*
I think there are some issues with the validation code. After getting the code rejected a couple of times it finally accepted it. I don't know if that's because my code is broken and I somehow managed to sneak around the problem in the generated test cases or if there's a problem with the test code itself
It generates random tests so it is possible to "get lucky". To know for sure you might want to look at the failed test cases.
It seems to me as if the returned results have to be sorted alphabetically, which is not stated in the instructions.
This could be just a side-effect of how you generate the list of possible deciphered strings, but I have to sort in order to pass the tests.
Can you give me an example of something you think should pass but doesn't? I am only checking to see if the decoded message is in the list of possibles you return.
This comment has been hidden.
Oh, I see. I messed up the example test case check. I fixed it now so that order doesn't matter. The hidden test cases don't worry about order.
It would be better if at the bottom of the instructions it is mentioned that
User test cases pass for me. I set
rotn = decode
, since I suspect you used that name in your tests (and it looks like that is the case), but the test still fails; it seems you pass a list instead of a string, yet you make no mention of that in the description.I fixed the rotn problem.
decode accepts a string and returns a list as shown in the examples.
I get this error when submitting:
Looks like the problem is in your solution validation code.
My bad. Is fixed now.
Fix confirmed.