Convert the plain text ATTACK into cipher text with the key value 4 by using Caesar cipher. * code example
Example: python caesar cipher
def caesar_encrypt():
word = input('Enter the plain text: ')
c = ''
for i in word:
if (i == ' '):
c += ' '
else:
c += (chr(ord(i) + 3))
return c
def caesar_decrypt():
word = input('Enter the cipher text: ')
c = ''
for i in word:
if (i == ' '):
c += ' '
else:
c += (chr(ord(i) - 3))
return c
plain = 'hello'
cipher = caesar_encrypt(plain)
decipher = caesar_decrypt(cipher)