Question: So confused !!!! need help !!!!!! quick !!!!!! Write the functions encrypt(message, key) and decrypt(message, key), where message is a string and key is a

So confused !!!! need help !!!!!! quick !!!!!!

Write the functions encrypt(message, key) and decrypt(message, key), where message is a string and key is a positive integer. Both functions return a string that contains messageencrypted/decrypted using the 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 a string with an error message

  • 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

    [4 pts] Write the unittest script to perform your testing for both functions encrypt and decryptusing the unittest module and prove that they work properly. Remember to be as descriptive as possible and write as many cases as necessary (check the Hands On video for example of a description). Unittest is intended to run test cases in bulk, so it should contain enough test cases to prove your code works. Discuss possible edge cases during your recitation. Do not include the doctest cases

    Deliverables:

  • Submit your encrypt and decrypt code in a file named LAB4.py to the Lab4 GradeScope

    assignment before the due date

  • Submit your unittest code in a file named test.py to the Lab4 CANVAS assignment before

    the due date

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 usehttps://www.braingle.com/brainteasers/codes/caesar.php#form to create test casesSo confused !!!! need help !!!!!! quick !!!!!! Write the functions encrypt(message,

def encrypt (message, key): >> encrypt ("Hello world",12) Tqxxa iadxp' >>> encrypt (''We are Penn State!!!", 6) >>> encrypt("We are Penn State!!!",5) >>>encrypt (5.6,3) error' >>encrypt ('Hello',3.5) 'error' >>>encrypt (5.6,3.15) 'error' 11 TI I YOU CODE STARTS HERE def decrypt (message, key): I1 TI T >>> decrypt ("Tqxxa iadxp",12) 'Hello world' 'We are Penn State!!!' >>> decrypt ("Bj fwj Ujss Xyfyj! !!", 5) 'We are Penn State!!!' >>decrypt (5.6, 3) error >>> decrypt('Hello', 3.5) 'error' >>> de error' crypt (5.6,3.15) 11 1 T

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!