valid key here is one that is between the integer values and (remember that max_key_size will only ever have the value because it is constantit then returns this key line sets key to the integer version of what the user typed inso getkey(returns an integer encrypt or decrypt the message with the given key def gettranslatedmessage(modemessagekey) if mode[ =' ' key -key translated 'gettranslatedmessage(does the encrypting and decrypting it has three parametersmode sets the function to encryption mode or decryption mode message is the plaintext (or ciphertextto be encrypted (or decryptedkey is the key that is used in this cipher line checks if the first letter in the mode variable is the string 'dif sothen the program is in decryption mode the only difference between the decryption and encryption mode is that in decryption mode the key is set to the negative version of itself if key was the integer then in decryption mode set it to - the reason why will be explained later translated is the string of the resulteither the ciphertext (if you are encryptingor the plaintext (if you are decryptingit starts as the blank string and has encrypted or decrypted characters concatenated to the end of it the isalpha(string method the isalpha(string method will return true if the string is an uppercase or lowercase letter from to if the string contains any non-letter charactersthen isalpha(will return false try entering the following into the interactive shell'helloisalpha(true 'forty twoisalpha(false 'fortytwoisalpha(true ' isalpha(false 'isalpha(false