Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In cryptography, the intended message sometimes consists of the first letter of

ID: 3767743 • Letter: I

Question

In cryptography, the intended message sometimes consists of the first letter of every word in a string. Write a function crypt that will receive one input string: the encrypted message. The function will return one string (the intended message) consisting of the first letter of every word in the input string. The function should return an appropriate value for input strings of any size. An example of a function call would look like this: >> estring = 'The early songbird tweets'; >> m = crypt (estring) m = Test

Explanation / Answer

def getMode():

   while True:

        print('Do you wish to encrypt a message?')

         mode = input().lower()

        if mode in 'encrypt'.split():

           return mode[0]

         else:

         print('Enter either "encrypt" or "e"')
         mode = getMode()
  
      message = getMessage()
  
      if mode[0] != 'e':
  
         key = getKey()
         print('Your translated text is:')
  
         if mode[0] != 'e':
  
        print(getTranslatedMessage(mode, message, key))
  
   else:
  
          for key in range(1, MAX_KEY_SIZE + 1):
  
          print(key, getTranslatedMessage('encrypt', message, key))
        
          end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote