"""encrypt the message using the key "" return translatemessage(messagekey'encrypt' def decryptmessage(messagekey) """decrypt the message using the key "" return translatemessage(messagekey'decrypt' def translatemessage(messagekeymode) """encrypt or decrypt the message using the key "" translated [stores the encrypted/decrypted message string keyindex key key upper( for symbol in messageloop through each character in message num letters find(symbol upper() if num !- - means symbol upper(was not in letters if mode ='encrypt' add if encrypting num +letters find(key[keyindex] elif mode ='decrypt' subtract if decrypting num -letters find(key[keyindex] num %len(lettershandle the potential wrap-around add the encrypted/decrypted symbol to translated if symbol isupper() translated append(letters[num] elif symbol islower() translated append(letters[numlower() keyindex + move to the next letter in the key if keyindex =len(key) keyindex else just add the symbol without encrypting/decrypting translated append(symbol return 'join(translated if this program was run (instead of imported)run the program if __name__ ='__main__' main( project #