Question: Q14 - Custom Encoder (1 point) Write a function custom_encoder () to encode a character from original messages, using our custom encoding scheme (defined

Q14 - Custom Encoder (1 point) Write a function custom_encoder () to encode a character from original messages, using our custom encoding scheme (defined below). This function should take two input parameters: char | the character to be encoded using our custom encoding scheme key | the key to be used in encoding (int; default: 200) Within the function, carry out the following: Define the dictionary custom_encodings (provided at end of this cell) If char is a key in the custom_encodings dictionary, store the corresponding value from the dictionary in output_char (i.e. if char were 'o', the function would return 'n' ) Otherwise, use the encoder () function you wrote earlier, storing the output in output_char, being sure to pass both char and key in as inputs. Be sure to return the encoded character (output_char ) from the function custom_encodings 'a' : 'r', " 'e' : 'p', 'i : 'm 'o' 'n } : : = {
Step by Step Solution
There are 3 Steps involved in it
Heres the implementation of the customencoder function according to the given requirements python de... View full answer
Get step-by-step solutions from verified subject matter experts
