Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Practical Strategies For Technical Communication

Authors: Mike Markel

1st Edition

1457653788, 978-1457653788

More Books

Students also viewed these Programming questions