Last active
January 20, 2018 20:41
-
-
Save arkan-leki/e2761f42e55956827baf6679796cd41d to your computer and use it in GitHub Desktop.
simple code of Caesar Cipher in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = "abcdefghijklmnopqrstuwxyz" | |
key = 3 | |
plain = "hello world 2day" | |
cyper = ""; | |
for c in plain: | |
if c.isalpha() : cyper += arr[(arr.index(c)+3)%26] | |
else: cyper += c | |
print(cyper) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment