Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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. The one output is then converted to a string. 3.Choose a cypher code and enter your cypher as a dictionaryex.{"a": "n",...}The code must include an alternate character for each of the 26 letters and a space. (Do not repeat any characters.) 4.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.5.Loop through the characters in the phrase and find each letter in the dictionary and use concatenation to create the resulting string.

image text in transcribed

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. The one output is the converted string. Choose a cypher code and enter your cypher as a dictionary-ex, 3. { "a": "n" , } The code must include an alternate character for each of the 26 letters and a space. (Do not repeat any characters.) Create an equivalent d could be used to return the code into the original characters Loop through the characters in the phrase and find each letter in the dictionary and use concatenation to create the resulting string 4. e-cypher key and enter it as a de-cypher dictionary which 5

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago