Question: Homework 3. Caesar Cipher Caesar Cipher is an encryption technique. It is a type of substitution cipher in which each letter in the plaintext is

 Homework 3. Caesar Cipher Caesar Cipher is an encryption technique. It

Homework 3. Caesar Cipher Caesar Cipher is an encryption technique. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a right shift of 3, A becomes D, B becomes E. .., X becomes A, Y becomes B, Z becomes C (Figure 1). The method is named after Julius Caesar, who used it in his private correspondence. ABCDEF ABCDEF Figure 1. A Caesar Cipher with a right shift of 3 Write a Python program to encrypt three-letter words using the Caesar Cipher: 1) Ask the user to input a three-letter word and the number of shifts. 2) Convert the word based on the number of shifts. If the number of the shifts exceeds 26, start from the beginning of the alphabet (e.g. shifting by 28 is the same as shifting by 2). 3) The program should resemble the following. Include the exit line. Upload the .py file and the output screenshot on Canvas. Enter a 3-letter word: bts Shift? 60 BTS is encrypted to JBA. Press Enter to Exit. Hint: Use the ref string in the slides examples. Some care needs to be taken when starting over from the alphasbet (e.g. S-A). Step 1: Get the first letter from the 3-letter word. Step 2: "Shift" the letter along the ref string - what is its index in ref and what is the index for the shifted letter? Step 3: Repeat the previous steps for the other two letters. Step 4: Concatenate the new letters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!