Question: i need this using python pleasee ! thankyou. You are required to write a PYTHON program that can code(cipher) an original message and also can
You are required to write a PYTHON program that can code(cipher) an original message and also can decode a coded message back to the original message when given the key, which is the integer used in coding the original message. After the user inputs an integer key and the message to be coded, the program will shift every letter of user's message by that integer. In other words, suppose the shift number (key) is k. Then, all instances of the n.th letter of the alphabet that appear in the message should become the (n + k).th letter of the alphabet in the coded message. You will need to be careful with the case in which n +k> 26 (the length of the alphabet). We will treat uppercase and lowercase letters individually, so that uppercase letters are always mapped to an uppercase letter, and lowercase letters are always mapped to a lowercase letter. If an uppercase letter maps to "A", then the same lowercase letter should map to "a". Punctuation and spaces should be retained and not changed. For example, a plaintext message with a comma should have a corresponding ciphertext with a comma in the same position. If there are numbers in the message, they also should be shifted by the same number k. Example Message Key Coded Message Hello 3. World 5 Mjqqt 8. Btwai Your program should also have a decoder, so that if the user knows the key, he should be able to decode the coded message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
