Question: Program 5: Caesar Cipher This problem builds on the Caesar Cipher program from a previous lab. If you didnt get to that part of the

Program 5: Caesar Cipher This problem builds on the Caesar Cipher program from a previous lab. If you didnt get to that part of the lab, heres some code that starts with a word, Minneapolis and shifts each letter by 6 letters to produce a coded word. word = "Minneapolis" shift = 6 coded_word = "" for letter in word: coded_letter = chr(ord(letter) + shift) coded_word = coded_word + coded_letter print(word + " in code is " + coded_word) Please write a function that takes a string (a word) and a number (the number of letters to shift) as arguments. The function should shift each letter by the number given; and return the coded word. Or, your function can take a sentence and a number as an argument, and return a coded sentence. Now, can you write a decoding function? This function will take a coded string and a number as arguments. Final version: write an encrypting/decrypting program. Ask the user if they want to encrypt or decrypt, and call the appropriate function. What if the user has lots of strings to encrypt and decrypt? Perhaps you could use a while true loop so the program repeats until the user wants to quit? Using python.

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!