pass if pyperclip is not installeddo nothing it' no big deal every possible symbol that can be encrypted/decrypted letters 'abcdefghijklmnopqrstuvwxyz def main() print('''vigenere cipherby al sweigart al@inventwithpython com the vigenere cipher is polyalphabetic substitution cipher that was powerful enough to remain unbroken for centuries ''' let the user specify 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(' ') mymode 'encrypt break elif response startswith(' ') mymode 'decrypt break print('please enter the letter or ' let the user specify the key to use while truekeep asking until the user enters valid key print('please specify the key to use ' print('it can be word or any combination of letters:' response input(''upper( if response isalpha() mykey response break let the user specify the message to encrypt/decrypt print('enter the message to {format(mymode) mymessage input('' perform the encryption/decryption if mymode ='encrypt' translated encryptmessage(mymessagemykey elif mymode ='decrypt' translated decryptmessage(mymessagemykey print('%sed message:(mymode title()) print(translated try pyperclip copy(translated print('full %sed text copied to clipboard (mymode) except pass do nothing if pyperclip wasn' installed def encryptmessage(messagekey)vigenere cipher