Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need this using python pleasee ! thankyou. You are required to write a PYTHON program that can code(cipher) an original message and also can

i need this using python pleasee ! thankyou. image text in transcribed
You are required to write a PYTHON program that can code(cipher) an original message and also can decode a coded message back to the original message when given the key, which is the integer used in coding the original message. After the user inputs an integer key and the message to be coded, the program will shift every letter of user's message by that integer. In other words, suppose the shift number (key) is k. Then, all instances of the n.th letter of the alphabet that appear in the message should become the (n + k).th letter of the alphabet in the coded message. You will need to be careful with the case in which n +k> 26 (the length of the alphabet). We will treat uppercase and lowercase letters individually, so that uppercase letters are always mapped to an uppercase letter, and lowercase letters are always mapped to a lowercase letter. If an uppercase letter maps to "A", then the same lowercase letter should map to "a". Punctuation and spaces should be retained and not changed. For example, a plaintext message with a comma should have a corresponding ciphertext with a comma in the same position. If there are numbers in the message, they also should be shifted by the same number k. Example Message Key Coded Message Hello 3. World 5 Mjqqt 8. Btwai Your program should also have a decoder, so that if the user knows the key, he should be able to decode the coded 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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago