Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Nothing special solution in Clear category for Caesar Cipher (encryptor) by swagg010164
def to_encrypt(text, delta):
d = {}
for i in range(26):
if 97 <= i + 97 + delta <= 122:
d[chr(i + 97)] = chr(i + 97 + delta)
elif i + 97 + delta < 97:
d[chr(i + 97)] = chr(122 + i + delta + 1)
elif i + 97 + delta > 122:
d[chr(i + 97)] = chr(i + delta + 71)
return ''.join(d[text[i]] if text[i] != ' ' else ' ' for i in range(len(text)))
Nov. 9, 2019
Comments: