Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 82531e0

Browse files
Create caesarscipher.md
1 parent a829853 commit 82531e0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎3. Caesars Cipher/caesarscipher.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
☕ 🔥
2+
3+
One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount.
4+
5+
A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus A ↔ N, B ↔ O and so on.
6+
7+
Write a function which takes a ROT13 encoded string as input and returns a decoded string.
8+
9+
All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.
10+
11+
<h1>Tests :</h1>
12+
13+
rot13("SERR PBQR PNZC") should decode to the string FREE CODE CAMP.
14+
15+
rot13("SERR CVMMN!") should decode to the string FREE PIZZA!
16+
17+
rot13("SERR YBIR?") should decode to the string FREE LOVE?
18+
19+
rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.") should decode to the string THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /