Question: Q . 1 2 Cipher A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift of 4 maps '
Q Cipher
A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift of maps a to e and
maps p to t Here is a famous line from Shakespeare encrypted with a shift of : vq dg qt pqv vq dg: vjcv ku vjg
swguvkqp.
Write a program that takes as input a string to be encrypted and an integer encryption shift such as mentioned
earlier and prints the encrypted string. Hint: zip is helpful in building a dictionary. Also, remember to
handle space it doesn't shift
Extend your program to take an additional input that indicates if your program is to encrypt or decrypt the
string.
write in python
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
