Question: def encrypt(message, key): Takes a string and an integer an returns the encrypted message using the Caesar cipher method >>> encrypt(Hello world,12) 'Tqxxa iadxp'
ab4%20(1).pdf 16 pts] Write the functions encrypt(message, key) and decrypt(message, key), where message is a string and key is an integer. Both functions return a string that contains message encrypted/decrypted using tue Caesar cipher method. If a string is not provided as an input for message or an integer is not provided for key, the function must return an error message 'Invalid mput Functions must encrypt/decrypt both uppercase and lowercase letters decrypt(message, key) retrieves the original message encrypted by the encrypt function if the same key is used .Numbers and punctuation can remain the same 14 pts] Write the unit test script to perform your testing for both functions encrypt and decryr using the unittest module and prove that they work properly. Remember to be as descriptive as possible and write as many cases as necessary Notes One of the purposes of unit testing is to provide evidence that everything was tested and it works properly. Feedback will be provided if your code does not work according to the assignment requirements, but no partial credit will be given. You can use https://cryptii.comcaesar-cipher to create base cases Deliverables: You must submit the following 2 files to the Lab 4 CANVAS assignment before the due date: Your code in a file named LAB4. test.py that contains the unit test code . Make sure to include both files in your submission La04 (11.pd LA03 (11 py MacBook Air F4 FS F7 F8 F1O
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
