6 kyu
Playing with passphrases
423 of 11,830g964
Description:
Everyone knows passphrases. One can choose passphrases from poems, songs, movies names and so on but frequently they can be guessed due to common cultural references. You can get your passphrases stronger by different means. One is the following:
choose a text in capital letters including or not digits and non alphabetic characters,
- shift each letter by a given number but the transformed letter must be a letter (circular shift),
- replace each digit by its complement to 9,
- keep such as non alphabetic and non digit characters,
- downcase each letter in odd position, upcase each letter in even position (the first character is in position 0),
- reverse the whole result.
Example:
your text: "BORN IN 2015!", shift 1
1 + 2 + 3 -> "CPSO JO 7984!"
4 "CpSo jO 7984!"
5 "!4897 Oj oSpC"
With longer passphrases it's better to have a small and easy program. Would you write it?
Strings
Algorithms
Similar Kata:
Stats:
Created | Jul 2, 2015 |
Published | Jul 2, 2015 |
Warriors Trained | 42239 |
Total Skips | 11123 |
Total Code Submissions | 71056 |
Total Times Completed | 11830 |
Ruby Completions | 423 |
Python Completions | 2541 |
C# Completions | 842 |
Java Completions | 1690 |
JavaScript Completions | 2064 |
Haskell Completions | 182 |
CoffeeScript Completions | 36 |
Clojure Completions | 107 |
TypeScript Completions | 438 |
C++ Completions | 1100 |
PHP Completions | 596 |
Crystal Completions | 13 |
C Completions | 568 |
Swift Completions | 252 |
F# Completions | 63 |
Shell Completions | 86 |
OCaml Completions | 32 |
Julia Completions | 23 |
Scala Completions | 108 |
R Completions | 54 |
NASM Completions | 11 |
PowerShell Completions | 48 |
Go Completions | 340 |
Nim Completions | 17 |
Rust Completions | 235 |
Racket Completions | 24 |
Kotlin Completions | 300 |
Pascal Completions | 7 |
Perl Completions | 22 |
Elm Completions | 8 |
D Completions | 7 |
Prolog Completions | 11 |
COBOL Completions | 3 |
Total Stars | 641 |
% of votes with a positive feedback rating | 90% of 1845 |
Total "Very Satisfied" Votes | 1502 |
Total "Somewhat Satisfied" Votes | 308 |
Total "Not Satisfied" Votes | 35 |