Programming Homework Help. TU Message Object Self Shift & Encrypted Text Message Python Programming Worksheet
explain the following code in english and what they do…
Message.__init__(self, text)
self.shift = shift
self.encription_dict = self.build_shift_dict(shift)
self.message_text_encrypted = self.apply_encryption_shift(shift)
def get_shift(self):
”’
A getter function to return the shift
”’
# write your code here to perform the requirement
return self.shift
def get_encryption_dict(self):
”’
A getter fun
ction to return a copy of the built_shift_dict
”’
# write your code here to perform the requirement
return self.encryption_dict.copy()
def get_encrypted_text(self):
”’
A getter function that returns the encrypted_text
”’
# write your code here to perform the requirement
return self.message_text_encrypted
def change_shift(self, shift):
”’
Reconstructs an EncryptMessage object. The text is the same but the shift is a new number
Returns: nothing
”’
# write your code here to perform the requirement
EncryptMessage.__init__(self, self.get_message_text, shift)