Question: Create a simple Python application following the requirements below to allow a user to encode a piece of text using a cipher, or to
Create a simple Python application following the requirements below to allow a user to encode a piece of text using a cipher, or to decode the text using the same cipher. A "cipher" is a method of making a coded message that can be "deciphered" - usually the input to a cipher is the message to encode and some kind of "key" value that makes it make sense. In your program, after the user picks whether they are encoding or decoding the text, the user will enter text and it will either be encoded or decoded. Since your program allows both encoding and decoding, you will be able to (partly) test if the cypher works using just your own program. Detailed Requirements: Initial prompt: When the program starts the user is prompted to enter "1" to encode, "2" to decode, or "3" to exit. If the user inputs "1": o Accept one text input from the user; validation of this input may not be necessary o pass the user's text input to an "encode" function Print the encoded text string that was returned by the "encode" function Do the initial prompt again o If the user inputs "2": o Accept one text input from the user; validation of this input may not be necessary o pass the user's text input to an "decode" function o Print the decoded text string that was returned by the "decode" function Do the initial prompt again If the user inputs "3": o End the program If the user inputs anything other than "1", "2" or "3", re-prompt them with the initial prompt again.
Step by Step Solution
There are 3 Steps involved in it
Heres a simple Python program that follows the requirements you specified Define an encoding functio... View full answer
Get step-by-step solutions from verified subject matter experts
