You are viewing a single comment's thread. Return to all comments →
def caesarCipher(s, k): encrypted = '' for char in s: if char.isalpha(): base = ord('a') if char.islower() else ord('A') encrypted += chr((ord(char) - base + k) % 26 + base) else: encrypted += char return encrypted
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →