You are viewing a single comment's thread. Return to all comments →
Python 3.0
def caesarCipher(s, k): cipher = "" for i in s: if i.isalpha(): ascii_letter_a = 97 if i.isupper(): ascii_letter_a = 65 i = chr(ascii_letter_a + (ord(i) + k - ascii_letter_a) % 26) cipher += i return cipher
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 →
Python 3.0