Question: Use Python 3.7 and based on the test code alphabetABCDEFGHIJKLMNOPQRSTUVWXYZ ## encode and decode functions using string operations-write here what you did def encode_string (codestring,

Use Python 3.7 and based on the test code

Use Python 3.7 and based on the test code alphabetABCDEFGHIJKLMNOPQRSTUVWXYZ ## encode

and decode functions using string operations-write here what you did def encode_string

alphabetABCDEFGHIJKLMNOPQRSTUVWXYZ ## encode and decode functions using string operations-write here what you did def encode_string (codestring, plaintext) pass def decode string (codestring, ciphertext) pass import unittest from cipher import * class TestCipher (unittest. TestCase) ## test string operation def testdecodestring (self) codest ring = ("BCDEFGHlJKLMlOPQRSTUTWXYZA-') self. assertEqual (decode string (codestring, "CDE), "BCD) self. assertEqual (decode string (codestring, "ZZZAB"), "YYYZA") self. assertNotEqual (decode string (codestring, "ABC "ABC def testdecodestringwithextras (self) codestring-(JMBCYEKLFDGUVWHINXRTOSPZQA-") self.assertEqual (decode string (Codestring, "TMB.-CY:."), "ABC, DE: self. assertEqual (decode string (codestring, self. assertEqual (decode string (codestring, 1234567..."), 1234567...") def testdecodestringwithlowercase(self) codest ring= ("JMBCYEKLFDGUTy/H1NXRTOSPZQA-') self. assertEqual (decode string (codestring, "jMb, -cy::"), ABC DE) self. assertEqual (decode string (codestring, " Aps#$!"), " def testencodestring (self) codest ring= ("BCDEFGH1JKLINOPQRSTUTWXYZA-') self. assertEqual (encode string(codestring, "DEF"EFG") self. assertEqual (encode string (codestring, "AAAB") "BBBC) self. assertNotEqual (encode string (codestring, "ABC ABC) def testencodestringwithlowercase(self) codest ring= ("JMBCYEKLFDGUTy/H1NXRTOSPZQA-') self.assertEqual (encode-string (codest ring, "Abc, self. assertEqual (encode string (codestring, self.assertNotEqual (encode-string (code string, " De::), "JMB,-CY:.") APS#5i"), " APS#$!") def testencodestringwithextras (self) codestring-(JMBCYEKLFDGUVWHINXRTOSPZQA-") self. assertEqual (encode_ string(codestring, "ABC, DE"), "JMB,-CY:") self.assertEqual (encode-string (codest ring, Zwv#$!"), " APS#$1) self. assertEqual (encode string (codestring, 1234567..."), 1234567...")

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!