Question: Python: Cypher Function Create a function that will take a phrase and either coded or decode the phrase (use only lowercase letters and spaces). 1,

 Python: Cypher Function Create a function that will take a phrase

Python: Cypher Function Create a function that will take a phrase and either coded or decode the phrase (use only lowercase letters and spaces). 1, Name function "cypher. py" with two inputs and one output. 2. The first input is a string to code or decode and the second input is an integer where 0 tells the function code and 1 tells it to decode the string. Th one output is the converted string. 3. Choose a cypher code and enter your cypher as a dictionary-ex, ...) The code must include an alternate character for each of the 26 letters and a space. (Do not repeat any characters.) { "a": "n" Create an equivalent de-cypher key and enter it as a de-cypher dictionary which could be used to return the code into the original characters. 4. 5. Loop through the characters in the phrase and find each letter in the dictionary and use concatenation to create the resulting string

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!