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.
Very nice kata on encoding.
use
str.isdecimal()
for checking if it's Numeric mode (0-9) in Python
Thank you. Added fixed test to C#, Java, JavaScript, Julia, PHP, Python, Ruby and TypeScript.
Thank you. Fixed.
approved 🚽
LGTM, Approved!
[Python] update to new test framework: https://www.codewars.com/kumite/649ec120b3856c10bcc2e779?sel=649ec120b3856c10bcc2e779
Approved
Typo: Seperate the message string -> Split the message string
Fixed reference solution and added sample/fixed test for all 3 problematic chars.
Is that normal I get weird chars in the input? (python ; random tests ; edit: got the error one time only, trying to reproduce in a fork, right now)
If so, this should be tested as fixed tests too (both sample tests and full test suite)
edit²: happens in bytes mode / the ref solution is failing in the very same way on this kind of inputs => the range should be limited, when creating the input
I actually just realized it's a problem of clarity of the description (which is pretty "opaque"...)
=> what's defining the alphanum mode it "only chars contained in the provided
alphanumeric
string/variable"Changed.
this is incorrect: whitespaces are converted with alphanum mode too while they aren't "alhpanumeric"
Prefix: 0001
Length: 0000000010
The message encodes to 1000 and not 0001000, because the tuple (in this case length 2) has a leading zero and theirfor is encoded into 4 bits -> 1000
Complete message: 0001000000001010000
Changed the kata description to be a bit more specific.
Loading more items...