Question: Python Please create the decryption algorithm for the substitution. Thank you. Python Write the substitutionDecrypt method. Test your algorithm as shown below. Your code should

 Python Please create the decryption algorithm for the substitution. Thank you.

Python Please create the decryption algorithm for the substitution. Thank you.

Python Write the substitutionDecrypt method. Test your algorithm as shown below. Your code should work for any key. Code Writer 3 4 5 6 7 Sample output using testKeyl (*ZyXwvutsrqponmlkjihgfedcba') and cipherText message ('gsv jfrxp yildm ulc') from substitution.py file substitution.py 2 def substitutionEncrypt(plaintext, key): CipherText: gsv jfrxp yildm ulc alphabet "abcdefghijklmnopqrstuvwxyz Plain Text: the quick brown fox plaintext = plaintext.lower() cipherText for ch in plaintext: idx alphabet.find(ch) 8 cipherText cipherText + key[idx return cipherText 10 11 testkey1 "Zyxwvutsrqponmlkjihgfedcba 12 testkey2 "ouwckbjmpzyexavrltsfgdqihn 13 cipherText substitutionEncrypt("the quick brown fox", testkey1) 14 print(cipherText) 15 cipherText = substitutionEncrypt("the quick brown fox", testkey2) 16 print(cipherText) 9 11 = English (United States)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!