Question: Two functions will be written in this exercise. The first is called `make_dictionary(l1, l2)` that takes two equal-length lists of single-character strings. It creates and
Two functions will be written in this exercise. The first is called `make_dictionary(l1, l2)` that takes two equal-length lists of single-character strings. It creates and returns a dictionary using the elements of l1 as keys and the elements of l2 as values. The dictionary is then used by a function called `cipher(s, d)`. The parameter `s` is a string and `d` is the dictionary created by `make_dictionary`. Function `cipher(s, d)` uses dictionary `d` to replace characters in `s` that are keys in `d` with the corresponding key value. Characters in `s` that are not dictionary keys are left unchanged in the ciphered version of the string `s`. The ciphered word is returned.
In Python.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
