Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift of 4 maps 'a' to 'e' and maps 'p'
A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift of 4 maps 'a' to 'e' and maps 'p' to 't' Here is a famous line from Shakespeare encrypted with a shift of 4: vq dg qt pqv vq dg: vjcv ku vjg swguvkqp. (a) Write a program that takes as input a string to be encrypted and an integer en- crpytion shift (such as 4 mentioned above) and prints the encrypted string. Hint: zip() is helpful in building a dictionary. Also, remember to handle spaceit doesnt shift. (b) Extend your program to take an additional input that indicates if your program is to encrypt or decrypt the string.
-need to see the actual code in order to understand the tabbing
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started