Question: Help me make a cipher python script Caesar Cipher A Caesar Cipher (Link to an external site: https://en.wikipedia.org/wiki/Caesar_cipher ) (or shift cipher) is a simplistic

Help me make a cipher python script

Caesar Cipher

A Caesar Cipher (Link to an external site: https://en.wikipedia.org/wiki/Caesar_cipher ) (or shift cipher) is a simplistic encryption algorithm that encodes each letter by shifting it some number of places down the alphabet. If a character would shift beyond the end of alphabet, it wraps around to the beginning.

In teams of two or three, create a script that can encrypt and decrypt a message using a Caesar Cipher. Submit your code and a list of your teammate(s). Describe how your team shared the workload for the lab.

Input

Ask the user for the secret message they want to encrypt. Then ask how many positions in the alphabet to shift each character.

Output

Print the encrypted messaged (the ciphertext). Decrypt the ciphertext and print the original message (the plaintext).

Hint

You will need to use the ord() (Links to an external site.) and chr() (Links to an external site.) functions to convert letters to numbers and back again.

Capitals letters are in the range 65 to 90. Lowercase letters are 97 to 122. See this table (Links to an external site.) for more information.

Example Program Run

This is an example of what the screen might look like after the program executes, including bold values that were input by the user.

Enter message: This is a secret messageNumber of characters to shift (1 - 26): 7Encrypted: Aopz pz h zljyla tlzzhnlDecrypted: This is a secret message

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 Programming Questions!