The spec is incomplete from the description alone (what values to start at?). We're not supposed infer the specs from the sample tests, at least not in this kata ;-)
I know, it just sounded funny. Thinking about the ethymology of digit, it could make sense: we have ten fingers, not three or sixteen. Referring to hexadecimal digits as digits doesn't really mean anything, as we don't have any 12th or 14th finger
Maybe have some examples in the description? Here'd be a revised version:
Jack and Jill invented a cipher: each letter's char code is converted in the ternary number system (radix=3) and their digits *(trigits?)* are bumped by one (`0` → `1`, `1` → `2`, `2` → `3`). The transformed characters are then separated by a vertical beam (`|`).
For instance: `Hello` becomes `3311|21313|22111|22111|22121` and `Such an easy kata` becomes `21113|22211|21311|21323|2123|21232|22113|2123|21313|21232|22132|22222|2123|21333|21232|22133|21232`
You task is to write two functions: `encrypt` and `decrypt`. All test strings are guaranteed to be valid.
Good luck, warrior!
Usefull for newbies
thanks
Syntax error in starting code:
const newWeirdObject => () => ({})
should beconst newWeirdObject = () => ({})
The spec is incomplete from the description alone (what values to start at?). We're not supposed infer the specs from the sample tests, at least not in this kata ;-)
Needs random tests.
I know, it just sounded funny. Thinking about the ethymology of
digit
, it could make sense: we have ten fingers, not three or sixteen. Referring to hexadecimal digits as digits doesn't really mean anything, as we don't have any 12th or 14th fingerThere's no such thing as "trigit". Even
ABCDEF
in hexadecimal are called digits.Maybe have some examples in the description? Here'd be a revised version:
https://www.codewars.com/kata/reviews/5ccd33f248214d00017c56a5/groups/5cce9cd371631d00016c2ac2
added
looks nice!
@Voile may I talk with you on Discord? I want to know how to add random tests and how to disable e.g.
Number
constructor (for another kata).Needs random tests.
I'm not proficient enough in JS to do that, but if anyone wants to they can.
@TheBMachine Could you add JS/TS to this kata?
Loading more items...