every possible symbol that can be encrypted/decrypted (!you can add numbers and punctuation marks to encrypt those symbols as well symbols 'abcdefghijklmnopqrstuvwxyz print('caesar cipherby al sweigart al@inventwithpython com' print('the caesar cipher encrypts letters by shifting them over by ' print('key number for examplea key of means the letter is' print('encrypted into cthe letter encrypted into dand so on ' print( let the user enter if they are encrypting or decrypting while truekeep asking until the user enters or print('do you want to ( )ncrypt or ( )ecrypt?' response input(''lower( if response startswith(' ') mode 'encrypt break elif response startswith(' ') mode 'decrypt break print('please enter the letter or ' let the user enter the key to use while truekeep asking until the user enters valid key maxkey len(symbols print('please enter the key ( to {}to use format(maxkey) response input(''upper( if not response isdecimal() continue if <int(responselen(symbols) key int(response break let the user enter the message to encrypt/decrypt print('enter the message to {format(mode) message input('' caesar cipher only works on uppercase letters message message upper( stores the encrypted/decrypted form of the message translated ' encrypt/decrypt each symbol in the message for symbol in message if symbol in symbols get the encrypted (or decryptednumber for this symbol num symbols find(symbolget the number of the symbol if mode ='encrypt' num num key elif mode ='decrypt' num num key caesar cipher