Question: Write a program that can encode and decode Caesar ciphers. The input to the program will be a string of text and the value of
Write a program that can encode and decode Caesar ciphers. The input to the program will be a string of text and the value of the key (shift factor). The output will be an encoded message where each character in the original message is replaced by shifting it key characters in the ASCII character set. For example, if ch is a character in the string and key is the amount to shift, then the character that replaces ch can be calculated as: chr(ord(ch)) + key. The original message can be recovered (decoded) by using the negative of the key.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
