7 kyu
Ciphers #1 - The 01 Cipher
700 of 1,363ngmhprogramming
Description:
This is my first Kata in the Ciphers series. This series is meant to test our coding knowledge.
Ciphers #1 - The 01 Cipher
This cipher doesn't exist, I just created it by myself. It can't actually be used, as there isn't a way to decode it. It's a hash. Multiple sentences may also have the same result.
How this cipher works
It looks at the letter, and sees it's index in the alphabet, the alphabet being a-z
, if you didn't know. If it is odd, it is replaced with 1
, if it's even, its replaced with 0
. Note that the index should start from 0. Also, if the character isn't a letter, it remains the same.
Example
encode("Hello World!"); // => "10110 00111!"
This is because H
's index is 7
, which is odd, so it is replaced by 1
, and so on.
Have fun (en)coding!
Fundamentals
Similar Kata:
Stats:
Created | Jun 13, 2017 |
Published | Jun 13, 2017 |
Warriors Trained | 1989 |
Total Skips | 26 |
Total Code Submissions | 3919 |
Total Times Completed | 1363 |
Python Completions | 700 |
JavaScript Completions | 521 |
Ruby Completions | 75 |
PHP Completions | 134 |
Total Stars | 23 |
% of votes with a positive feedback rating | 92% of 323 |
Total "Very Satisfied" Votes | 278 |
Total "Somewhat Satisfied" Votes | 39 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 14 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |