Question: Create two dictionaries to encrypt and decrypt messages, one to encode each letter and one to decode each letter. Note: a space character should
Create two dictionaries to encrypt and decrypt messages, one to encode each letter and one to decode each letter. Note: a space character should stay a space in the encryption. Write one function that encrypts a plain message and another function that decrypts an encoded message, using the dictionaries you created. Each function should have a parameter which is the original message and return the encrypted or decrypted message. For example, using the cypher above encrypt("HELLO WORLD") should return "LUXXM RMHXP" and decrypt("LUXXM RMHXP") should return "HELLO WORLD". Finally, take in user input for a message and output the encrypted version, and take in user input for an encrypted message and output the decrypted version. Try the sample input below to test your code: Sample Input NEWJOBFIXMRGLUCKSHAZYTVPDQ HELLO WORLD CBMOEJB Sample Ouput RBMME CEKMY WELCOME
Step by Step Solution
There are 3 Steps involved in it
To create dictionaries for encryption and decryption you can use two dictionaries where keys represe... View full answer
Get step-by-step solutions from verified subject matter experts
