Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Q: How do you recruit employees?

Answered: 1 week ago

Question

1. Who will you assemble on the team?

Answered: 1 week ago

Question

4. Who would lead the group?

Answered: 1 week ago