Created
July 17, 2019 14:55
-
-
Save firaja/539b03d792f3f0ec000bf663a8c2ea35 to your computer and use it in GitHub Desktop.
This file contains 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
def caesar_cipher(message, key): | |
result = "" | |
for m in message: | |
result += chr((ord(m) + key - 97) % 26 + 97) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment