Question: Write a script that inputs a line of plaintext and a distance value and output an encrypted text using a Caesar cipher; then decrypt the

Write a script that inputs a line of plaintext and a distance value and output an encrypted text using a Caesar cipher; then decrypt the encrypted code your script generated back to its original plain text. (The script includes both encryption and decryption. ) The script should work for printable letters between ASCII 32 (Space) and 126 ('~') inclusive based on the decimal ASCII value on the Ascii table (Links to an external site.) Applying a good programming style, be sure to use CONSTANTs. (IN Python)

Sample run:

Enter a message: zebra Enter the distance value: 11 Encrypted: &pm}l Decrypted: zebra

Sample run:

Enter a message: $799.99 Enter the distance value: 9 Encrypted: -@BB7BB Decrypted: $799.99

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!