Question: in python, thank you so much! Morse code was created to transmit messages over the telegraph. It uses dots and dashes to signal letters. Below


Morse code was created to transmit messages over the telegraph. It uses dots and dashes to signal letters. Below are two lists. letters lists the 26 letters of the alphabet and some punctuation marks. morse lists the Morse code for each letter. Take this example: test = ['-..', .'] The first code is .. (dash-dot-dash-dot). That is the third entry in the morse list, which is 'c'. The second is...' which is '1'. Continuing this way, test translates to: 'close gate!. > letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', morse = ['.-', 1. Create a decoder dict that holds the roman letters and their Morse codes. We will use this to translate Morse code to roman letters. Should the Morse codes be the keys or should the roman letters be the keys? 2. Use your dict to decode the following. Print out the result. to_decode = [-, 1. Create an encoder dict that hold the roman letters and their Morse codes. We will use this to translate roman letters to Morse code. Should the Morse codes be the keys or should the roman letters be the keys?
Step by Step Solution
There are 3 Steps involved in it
For the first exercise to translate Morse code to Roman letters it would be practical to use the Morse code as the keys and the Roman letters as the v... View full answer
Get step-by-step solutions from verified subject matter experts
