num ord(symbol num +key if symbol isupper() if num ord(' ') num - elif num ord(' ') num + elif symbol islower() if num ord(' ') num - elif num ord(' ') num + translated +chr(num else translated +symbol return translated mode getmode( message getmessage( key getkey( print('your translated text is:' print(gettranslatedmessage(modemessagekey)how the code works the encryption and decryption processes are the reverse of the otherand even then they still share much of the same code let' look at how each line works caesar cipher max_key_size the first line is just comment max_key_size is constant that stores the integer in it max_key_size reminds us that in this programthe key used in the cipher should be between and deciding to encrypt or decrypt def getmode() while true print('do you wish to encrypt or decrypt message?'