Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your task is to create a simple encryption method. In your encryption process, you must replace each character in a sentence with the corresponding
Your task is to create a simple encryption method. In your encryption process, you must replace each character in a sentence with the corresponding character in the encryption list. Consider the following string files in your work: first_string = 'abcdefghijklmnopqrstuvwxyz' second_string='xuzbedepqrwyfghimnojklstva The first_string shows the sequance of alphabet characters. The second_string shows the corresponding encrpytion characters. For example, in this sequance, the character 'a' should be replaced by 'x' and the character 'b' should be replaced by 'u' and so on. 1. Write a small python function string_to_list that converts a string to a list of characters. 2. Convert first_string to first_list. 3. Convert second string to second_list. 4. Build a dictionary named enc_dict in which each character in first_list becomes a key and the corresponding character in second list becomes the value (Here is the expcted out put that shows first two elements in the dictionary: ('a':'x, b:u,...}). Consider two exceptions may be rised in the program. Your code should have the name of at least two exception.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started