mode input(lower(if mode in 'encrypt decrypt dsplit()return mode elseprint('enter either "encryptor "eor "decryptor " 'the getmode(function will let the user type in if they want encryption or decryption mode for the program the value returned from input(and lower(is stored in mode the if statement' condition checks if the string stored in mode exists in the list returned by 'encrypt decrypt dsplit(this list is ['encrypt'' ''decrypt'' ']but it is easier for the programmer to type 'encrypt decrypt dsplit(and not type in all those quotes and commas use whichever is easiest for youthey both evaluate to the same list value this function will return the string in mode as long as mode is equal to 'encrypt'' ''decrypt'or 'dthereforegetmode(will return the string 'eor the string ' (but the user can type in either " ""encrypt"" "or "decryptgetting the message from the player def getmessage() print('enter your message:' return input(the getmessage(function simply gets the message to encrypt or decrypt from the user and returns it getting the key from the player def getkey() key while true print('enter the key number ( -% )(max_key_size) key int(input() if (key > and key <max_key_size) return key the getkey(function lets the player type in the key they will use to encrypt or decrypt the message the while loop ensures that the function keeps looping until the user enters valid key post questions to