7 kyu
Ciphers #1 - The 01 Cipher
708 of 1,378ngmhprogramming
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 | 2008 |
Total Skips | 26 |
Total Code Submissions | 3962 |
Total Times Completed | 1378 |
Python Completions | 708 |
JavaScript Completions | 528 |
Ruby Completions | 77 |
PHP Completions | 135 |
Total Stars | 24 |
% of votes with a positive feedback rating | 92% of 324 |
Total "Very Satisfied" Votes | 279 |
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 |