Question: Write python program for the Caesar cipher with the following requirements: ( 1 ) Define a function to encrypt with the following header. It takes
Write python program for the Caesar cipher with the following requirements:
Define a function to encrypt with the following header. It takes in an English message
containing letters only and a key between and inclusively, and returns the ciphertext:
def encryptmessage key:
Define a function to decrypt with the following header. It takes in a ciphertext and a key
between and inclusively, and returns the plaintext:
def decryptciphertext key:
Define a main function. First, it asks user what to do: encrypt or decrypt. Once the user
makes the choice, it then asks for the text and the key. It should output the corresponding results.
def main:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
